@@ -9,15 +9,15 @@ using namespace omath::collision;
99TEST (LineTracerExtra, MissParallel)
1010{
1111 constexpr Triangle<Vector3<float >> tri ({0 ,0 ,0 },{1 ,0 ,0 },{0 ,1 ,0 });
12- constexpr Ray ray{ .start ={0 .3f ,0 .3f ,1 .f }, .end ={0 .3f ,0 .3f ,2 .f }, .infinite_length =. infinite_length = false }; // parallel above triangle
12+ constexpr Ray ray{ .start ={0 .3f ,0 .3f ,1 .f }, .end ={0 .3f ,0 .3f ,2 .f }, .infinite_length =false }; // parallel above triangle
1313 const auto hit = LineTracer::get_ray_hit_point (ray, tri);
1414 EXPECT_EQ (hit, ray.end );
1515}
1616
1717TEST (LineTracerExtra, HitCenter)
1818{
1919 constexpr Triangle<Vector3<float >> tri ({0 ,0 ,0 },{1 ,0 ,0 },{0 ,1 ,0 });
20- constexpr Ray ray{ .start ={0 .3f ,0 .3f ,-1 .f }, .end ={0 .3f ,0 .3f ,1 .f }, .infinite_length =. infinite_length = false };
20+ constexpr Ray ray{ .start ={0 .3f ,0 .3f ,-1 .f }, .end ={0 .3f ,0 .3f ,1 .f }, .infinite_length =false };
2121 const auto hit = LineTracer::get_ray_hit_point (ray, tri);
2222 ASSERT_FALSE (hit == ray.end );
2323 EXPECT_NEAR (hit.x , 0 .3f , 1e-6f );
@@ -28,7 +28,7 @@ TEST(LineTracerExtra, HitCenter)
2828TEST (LineTracerExtra, HitOnEdge)
2929{
3030 constexpr Triangle<Vector3<float >> tri ({0 ,0 ,0 },{1 ,0 ,0 },{0 ,1 ,0 });
31- constexpr Ray ray{ .start ={0 .0f ,0 .0f ,1 .f }, .end ={0 .0f ,0 .0f ,0 .f }, .infinite_length =. infinite_length = false };
31+ constexpr Ray ray{ .start ={0 .0f ,0 .0f ,1 .f }, .end ={0 .0f ,0 .0f ,0 .f }, .infinite_length =false };
3232 // hitting exact vertex/edge may be considered miss; ensure function handles without crash
3333 if (const auto hit = LineTracer::get_ray_hit_point (ray, tri); hit != ray.end )
3434 {
@@ -41,7 +41,7 @@ TEST(LineTracerExtra, InfiniteRayIgnoredIfBehind)
4141{
4242 constexpr Triangle<Vector3<float >> tri ({0 ,0 ,0 },{1 ,0 ,0 },{0 ,1 ,0 });
4343 // Ray pointing away but infinite_length true should be ignored
44- constexpr Ray ray{ .start ={0 .5f ,0 .5f ,-1 .f }, .end ={0 .5f ,0 .5f ,-2 .f }, .infinite_length =. infinite_length = true };
44+ constexpr Ray ray{ .start ={0 .5f ,0 .5f ,-1 .f }, .end ={0 .5f ,0 .5f ,-2 .f }, .infinite_length =true };
4545 const auto hit = LineTracer::get_ray_hit_point (ray, tri);
4646 EXPECT_EQ (hit, ray.end );
4747}
0 commit comments