jeremyong/klein

invalid plane::normalized function implementation

Closed this issue · 2 comments

class plane final {
...
    [[nodiscard]] plane normalized() const noexcept
    {
        plane out;
        out.normalize();
        return out;
    }
...
};

is missing an assignment. Should be:

class plane final {
...
    [[nodiscard]] plane normalized() const noexcept
    {
        plane out = *this;
        out.normalize();
        return out;
    }
...
};

Thanks! That is indeed an egregious bug. Interested in a PR? Otherwise I will get to it soon today

NVM I managed to squeeze in some time and fixed this and one other case I found with the same error. Thanks for reporting it @radoslawcybulski !