aboutsummaryrefslogtreecommitdiff
path: root/src/unittest/test_utilities.cpp
diff options
context:
space:
mode:
authorLoïc Blot <loic.blot@unix-experience.fr>2018-04-03 18:16:17 +0200
committerLoïc Blot <loic.blot@unix-experience.fr>2018-04-03 18:16:17 +0200
commit67a4cb7d8a4461fe7d5206189fd4e9539beb20b7 (patch)
tree059f4bea1f880c297a54b02d8f8e99bb77d1359f /src/unittest/test_utilities.cpp
parentbaca933b6bcf8c321748defa19769a54b27a89ba (diff)
downloadminetest-67a4cb7d8a4461fe7d5206189fd4e9539beb20b7.tar.gz
minetest-67a4cb7d8a4461fe7d5206189fd4e9539beb20b7.tar.bz2
minetest-67a4cb7d8a4461fe7d5206189fd4e9539beb20b7.zip
Fix various clang-tidy reported performance-type-promotion-in-math-fn
Diffstat (limited to 'src/unittest/test_utilities.cpp')
-rw-r--r--src/unittest/test_utilities.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unittest/test_utilities.cpp b/src/unittest/test_utilities.cpp
index 95c34a9c7..315cbf0fc 100644
--- a/src/unittest/test_utilities.cpp
+++ b/src/unittest/test_utilities.cpp
@@ -119,7 +119,8 @@ void TestUtilities::testAngleWrapAround()
UASSERT(std::fabs(modulo360f(f) - fmodf(f, 360)) < 0.001);
UASSERT(std::fabs(wrapDegrees_180(f) - ref_WrapDegrees180(f)) < 0.001);
UASSERT(std::fabs(wrapDegrees_0_360(f) - ref_WrapDegrees_0_360(f)) < 0.001);
- UASSERT(wrapDegrees_0_360(fabs(wrapDegrees_180(f) - wrapDegrees_0_360(f))) < 0.001);
+ UASSERT(wrapDegrees_0_360(
+ std::fabs(wrapDegrees_180(f) - wrapDegrees_0_360(f))) < 0.001);
}
}