Re: Maths portion of LCv3
Posted by
R. van Twisk on
URL: https://forum.librecad.org/Maths-portion-of-LCv3-tp5713530p5713542.html
gaganjyot wrote
.....
Yes sure, that's the part of the testing of immutable vs mutable. I'll check that.
Further I wonder about the other questions,
is it supposed to be,
Quadratic rotate(const double& a); or Quadratic& rotate(const double& a);
You won't return a reference but a new copy, so it would be : const Quadratic rotate(const double& a) const;
gaganjyot wrote
and if its fine if we use static 2x2 matrix for quadratic operations or we need a dynamic one?
I would keep it static, if there comes a need to make it dynamic then this should be a very easy change that's would be very easy to refactor.
Use initialization lists where possible
Ries