Improve math module (#396)
* Improve math module - Mark almost everything constexpr - Equality (a == b) is now exact, down to the bit level. If you want approximate equality use the new ApproxEqual method/static method - Rename Nz::Extend to Nz::Extent - Removed Make[] and Set[] methods in favor of their static counterpart and operator=
This commit is contained in:
@@ -67,12 +67,12 @@ SCENARIO("Ray", "[MATH][RAY]")
|
||||
|
||||
THEN("For the bounding volume collision's")
|
||||
{
|
||||
Nz::BoundingVolumef nullVolume(Nz::Extend::Null);
|
||||
Nz::BoundingVolumef nullVolume(Nz::Extent::Null);
|
||||
CHECK(!ray.Intersect(nullVolume));
|
||||
|
||||
float tmpClosest = -1.f;
|
||||
float tmpFurthest = -1.f;
|
||||
Nz::BoundingVolumef infiniteVolume(Nz::Extend::Infinite);
|
||||
Nz::BoundingVolumef infiniteVolume(Nz::Extent::Infinite);
|
||||
CHECK(ray.Intersect(infiniteVolume, &tmpClosest, &tmpFurthest));
|
||||
CHECK(tmpClosest == Catch::Approx(0.f));
|
||||
CHECK(tmpFurthest == std::numeric_limits<float>::infinity());
|
||||
|
||||
Reference in New Issue
Block a user