mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
MATH: Use floats where appropriate
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user