mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix various clang-tidy reported performance-type-promotion-in-math-fn
This commit is contained in:
parent
baca933b6b
commit
67a4cb7d8a
8 changed files with 20 additions and 17 deletions
|
@ -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))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue