DarkRadiant: master 8d29109b
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
orbweaver | orbweaver | master | 04.04.2021 16:30 | master cda42e96 |
Changeset | Fix NormaliseVector3 test I'm not sure why the NormaliseVector3 test started failing after the previous change to getLength(); the calculation performed in the test (v * 1.0/v.getLength()) seems to be exactly the same as what normalise() is doing, so I guess this is some aspect of floating point rounding that I haven't fully understood. Instead of adding a local isNear() function for fuzzy comparison, there is now a math::near() function defined in Vector3.h itself. This can in future be overloaded for other types, to replace the cumbersome float_equal_epsilon and similar functions. |
|||
mod - libs/math/Vector3.h | Diff File | |||
mod - test/math/Vector.cpp | Diff File |