diff options
author | Loïc Blot <loic.blot@unix-experience.fr> | 2018-04-03 18:16:17 +0200 |
---|---|---|
committer | Loïc Blot <loic.blot@unix-experience.fr> | 2018-04-03 18:16:17 +0200 |
commit | 67a4cb7d8a4461fe7d5206189fd4e9539beb20b7 (patch) | |
tree | 059f4bea1f880c297a54b02d8f8e99bb77d1359f /src/util | |
parent | baca933b6bcf8c321748defa19769a54b27a89ba (diff) | |
download | minetest-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/util')
-rw-r--r-- | src/util/numeric.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/numeric.cpp b/src/util/numeric.cpp index 12c91be91..cb984d8cb 100644 --- a/src/util/numeric.cpp +++ b/src/util/numeric.cpp @@ -172,6 +172,6 @@ s16 adjustDist(s16 dist, float zoom_fov) return dist; // new_dist = dist * ((1 - cos(FOV / 2)) / (1-cos(zoomFOV /2))) ^ (1/3) - return round(dist * cbrt((1.0f - cos(default_fov / 2.0f)) / - (1.0f - cos(zoom_fov / 2.0f)))); + return round(dist * cbrt((1.0f - std::cos(default_fov / 2.0f)) / + (1.0f - std::cos(zoom_fov / 2.0f)))); } |