From be779546e8355edd58fad6743f958932cd41bbe8 Mon Sep 17 00:00:00 2001 From: Andreas Stallinger Date: Tue, 29 Apr 2014 16:36:28 +0200 Subject: [PATCH] test: fix - replaced sqrtf with sqrt --- src/test/Vector2TestSuite.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/Vector2TestSuite.h b/src/test/Vector2TestSuite.h index 9897fb91..b72970b8 100644 --- a/src/test/Vector2TestSuite.h +++ b/src/test/Vector2TestSuite.h @@ -43,11 +43,11 @@ public: TS_ASSERT_EQUALS(18.0f, vec0.getLengthSquared()); vec0.x = -3.0f; TS_ASSERT_EQUALS(18.0f, vec0.getLengthSquared()); - TS_ASSERT_EQUALS(std::sqrtf(18.0f), vec0.getLength()); + TS_ASSERT_EQUALS(std::sqrt(18.0f), vec0.getLength()); Vec2i vec1(4, 2); TS_ASSERT_EQUALS(20.0f, vec1.getLengthSquared()); - TS_ASSERT_EQUALS(std::sqrtf(20.0f), vec1.getLength()); + TS_ASSERT_EQUALS(std::sqrt(20.0f), vec1.getLength()); } @@ -55,7 +55,7 @@ public: { Vec2f vec0(1.0f, 1.0f); - float targetXY = 1.0f / std::sqrtf(2.0f); + float targetXY = 1.0f / std::sqrt(2.0f); TS_ASSERT_EQUALS(targetXY, vec0.normalized().x); TS_ASSERT_EQUALS(targetXY, vec0.normalized().y); @@ -68,8 +68,8 @@ public: float y = 42.42f; vec0.x = x; vec0.y = y; - float targetX = x / std::sqrtf(x * x + y * y); - float targetY = y / std::sqrtf(x * x + y * y); + float targetX = x / std::sqrt(x * x + y * y); + float targetY = y / std::sqrt(x * x + y * y); vec0.normalize(); TS_ASSERT_EQUALS(targetX, vec0.x); TS_ASSERT_EQUALS(targetY, vec0.y);