2727
2828using namespace yup ;
2929
30- namespace
31- {
32- static constexpr float tol = 1e-5f ;
33- } // namespace
34-
3530TEST (PointTests, Default_Constructor)
3631{
3732 Point<float > p;
@@ -120,6 +115,8 @@ TEST (PointTests, Magnitude)
120115
121116TEST (PointTests, Circumference_Points)
122117{
118+ static constexpr float tol = 1e-5f ;
119+
123120 Point<float > center (1 .0f , 1 .0f );
124121 float radius = 2 .0f ;
125122 float angle = 0 .0f ; // 0 degrees
@@ -160,6 +157,8 @@ TEST (PointTests, Scaling)
160157
161158TEST (PointTests, Rotation)
162159{
160+ static constexpr float tol = 1e-5f ;
161+
163162 float angle = MathConstants<float >::halfPi; // 90 degrees
164163
165164 {
@@ -473,6 +472,8 @@ TEST (PointTests, ApproximatelyEqualTo)
473472
474473TEST (PointTests, EllipticalCircumference)
475474{
475+ static constexpr float tol = 1e-5f ;
476+
476477 Point<float > center (1 .0f , 1 .0f );
477478 float radiusX = 2 .0f ;
478479 float radiusY = 3 .0f ;
@@ -614,6 +615,8 @@ TEST (PointTests, Normalize_Zero)
614615
615616TEST (PointTests, Transform_DifferentTypes)
616617{
618+ static constexpr float tol = 1e-5f ;
619+
617620 Point<float > p (1 .0f , 2 .0f );
618621
619622 // Test with translation
@@ -637,6 +640,8 @@ TEST (PointTests, Transform_DifferentTypes)
637640
638641TEST (PointTests, Circumference_NegativeRadii)
639642{
643+ static constexpr float tol = 1e-5f ;
644+
640645 Point<float > center (1 .0f , 1 .0f );
641646 float radius = -2 .0f ; // Negative radius
642647
@@ -733,6 +738,8 @@ TEST (PointTests, VectorOperations_EdgeCases)
733738
734739TEST (PointTests, NormalizationEdgeCases)
735740{
741+ static constexpr float tol = 1e-5f ;
742+
736743 // Test already normalized vector
737744 Point<float > normalized (0 .6f , 0 .8f ); // magnitude = 1.0
738745 EXPECT_TRUE (normalized.isNormalized ());
@@ -807,6 +814,8 @@ TEST (PointTests, LerpAndMidpoint_EdgeCases)
807814
808815TEST (PointTests, RotationWithOrigin)
809816{
817+ static constexpr float tol = 1e-5f ;
818+
810819 Point<float > p (1 .0f , 0 .0f );
811820
812821 // Test rotation around origin
@@ -827,6 +836,8 @@ TEST (PointTests, RotationWithOrigin)
827836
828837TEST (PointTests, AngleTo_EdgeCases)
829838{
839+ static constexpr float tol = 1e-5f ;
840+
830841 Point<float > origin (0 .0f , 0 .0f );
831842 Point<float > right (1 .0f , 0 .0f );
832843 Point<float > up (0 .0f , 1 .0f );
0 commit comments