aboutsummaryrefslogtreecommitdiff
path: root/src/util/numeric.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/numeric.cpp')
-rw-r--r--src/util/numeric.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/numeric.cpp b/src/util/numeric.cpp
index 7264e5f89..d878a3f60 100644
--- a/src/util/numeric.cpp
+++ b/src/util/numeric.cpp
@@ -168,7 +168,7 @@ s16 adjustDist(s16 dist, float zoom_fov)
// 1.775 ~= 72 * PI / 180 * 1.4, the default FOV on the client.
// The heuristic threshold for zooming is half of that.
static constexpr const float threshold_fov = 1.775f / 2.0f;
- if (zoom_fov > threshold_fov)
+ if (zoom_fov < 0.001f || zoom_fov > threshold_fov)
return dist;
return std::round(dist * std::cbrt((1.0f - std::cos(threshold_fov)) /