try to fix mac test

This commit is contained in:
ohyzha
2024-10-29 13:08:42 +02:00
parent 7fca7cff64
commit 002914861e

View File

@@ -63,10 +63,10 @@ TEST_CASE("RaySphereIntersection")
REQUIRE(ray.IntersectSphere(Vector3f(0), 1, h1, h2) == 1); REQUIRE(ray.IntersectSphere(Vector3f(0), 1, h1, h2) == 1);
REQUIRE(h1 == h2); REQUIRE(h1 == h2);
::CompareVec3Approx(h1.normal, h1.point); ::CompareVec3Approx(h1.normal, h1.point);
const auto& value = ray.IntersectSphere(Vector3f(0), 1).value(); auto value = ray.IntersectSphere(Vector3f(0), 1);
REQUIRE(value.distance == h1.distance); REQUIRE(value->distance == h1.distance);
::CompareVec3Approx(value.normal, h1.normal); ::CompareVec3Approx(value->normal, h1.normal);
::CompareVec3Approx(value.point, h1.point); ::CompareVec3Approx(value->point, h1.point);
} }
// ray intersects sphere behind the origin // ray intersects sphere behind the origin
{ {