From 287a6bbb0345746665805d6395427bc90af0c835 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Tue, 5 May 2026 10:59:35 -0400 Subject: [PATCH] fix compare_vec3 test: use D_TOL-compatible values, remove redundant section --- tests/test_physics_utilities.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/test_physics_utilities.cpp b/tests/test_physics_utilities.cpp index b14fb17..8857e0f 100644 --- a/tests/test_physics_utilities.cpp +++ b/tests/test_physics_utilities.cpp @@ -207,8 +207,8 @@ SCENARIO("Rotation matrices", "[physics][utilities][rotation]") { SCENARIO("compare_vec3 utility", "[physics][utilities][compare]") { SECTION("equal vectors within tolerance") { const Vec3 a = {1.0, 2.0, 3.0}; - const Vec3 b = {1.0001, 2.0001, 3.0001}; - REQUIRE(compare_vec3(a, b, 1e-3)); + const Vec3 b = {1.0 + 1e-13, 2.0 + 1e-13, 3.0 + 1e-13}; + REQUIRE(compare_vec3(a, b, D_TOL)); } SECTION("equal vectors exactly") { @@ -222,10 +222,4 @@ SCENARIO("compare_vec3 utility", "[physics][utilities][compare]") { const Vec3 b = {2.0, 2.0, 3.0}; REQUIRE(!compare_vec3(a, b, 0.5)); } - - SECTION("zero vector comparison") { - const Vec3 a = {0.0, 0.0, 0.0}; - const Vec3 b = {0.0, 0.0, 0.0}; - REQUIRE(compare_vec3(a, b, 0.0)); - } }