From c534a138e02b60f2b6ebdc9f6208e5860b2375b4 Mon Sep 17 00:00:00 2001 From: Helco Date: Fri, 31 Oct 2025 19:01:45 +0100 Subject: [PATCH] MATH: Use floats where appropriate --- test/math/ray.h | 4 ++-- test/math/vector3d.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/math/ray.h b/test/math/ray.h index 5345583d0f3..87bd05a1dbc 100644 --- a/test/math/ray.h +++ b/test/math/ray.h @@ -25,7 +25,7 @@ public: Math::Vector3d d(0, 1, 2); Math::Ray r(o, d); - r.translate(Math::Vector3d(0.5, 0.2, 0.1)); + r.translate(Math::Vector3d(0.5f, 0.2f, 0.1f)); TS_ASSERT(r.getDirection() == d); Math::Vector3d o2 = r.getOrigin(); @@ -42,7 +42,7 @@ public: const Math::Vector3d v3(0, 10, 20); // A ray that points along the x axis, should hit the triangle at the origin - Math::Ray r(Math::Vector3d(-9.5, 0, 0.7), Math::Vector3d(1, 0, 0)); + Math::Ray r(Math::Vector3d(-9.5f, 0, 0.7f), Math::Vector3d(1, 0, 0)); Math::Vector3d loc(7, 8, 9); // add values to ensure it's changed float dist = 99.0f; diff --git a/test/math/vector3d.h b/test/math/vector3d.h index 2dcf484b9d3..ff9d840f34a 100644 --- a/test/math/vector3d.h +++ b/test/math/vector3d.h @@ -60,7 +60,7 @@ public: Math::Vector3d v1(1, 0, 2); Math::Vector3d v2(0, 5, 3); - Math::Vector3d int1 = Math::Vector3d::interpolate(v1, v2, 0.1); + Math::Vector3d int1 = Math::Vector3d::interpolate(v1, v2, 0.1f); TS_ASSERT_DELTA(int1.x(), 0.9, 0.0001); TS_ASSERT_DELTA(int1.y(), 0.5, 0.0001); TS_ASSERT_DELTA(int1.z(), 2.1, 0.0001);