diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-04 07:42:40 +0200 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2018-04-04 07:42:40 +0200 |
commit | 8e0b80aa369df7d1142053f077df928106c6ce8c (patch) | |
tree | 7f12869eef1a18364be9d8db67e01d060bc11d60 /src/util | |
parent | a90d27e1e23fa1c369c05a4d9c6083aa86ef7f52 (diff) | |
download | minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.tar.gz minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.tar.bz2 minetest-8e0b80aa369df7d1142053f077df928106c6ce8c.zip |
Fix last performance-type-promotion-in-math-fn problems
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/numeric.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/numeric.cpp b/src/util/numeric.cpp index f533c275f..ddd4fd6cc 100644 --- a/src/util/numeric.cpp +++ b/src/util/numeric.cpp @@ -173,6 +173,6 @@ s16 adjustDist(s16 dist, float zoom_fov) // new_dist = dist * ((1 - cos(FOV / 2)) / (1-cos(zoomFOV /2))) ^ (1/3) // note: FOV is calculated at compilation time - return round(dist * std::cbrt((1.0f - std::cos(default_fov)) / + return std::round(dist * std::cbrt((1.0f - std::cos(default_fov)) / (1.0f - std::cos(zoom_fov / 2.0f)))); } |