From 8e0b80aa369df7d1142053f077df928106c6ce8c Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 4 Apr 2018 07:42:40 +0200 Subject: Fix last performance-type-promotion-in-math-fn problems --- src/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/camera.cpp') diff --git a/src/camera.cpp b/src/camera.cpp index cf96f3308..ebb154137 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -291,7 +291,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, f32 tool_r { f32 oldy = old_player_position.Y; f32 newy = player_position.Y; - f32 t = exp(-23*frametime); + f32 t = std::exp(-23 * frametime); player_position.Y = oldy * t + newy * (1-t); } @@ -481,7 +481,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, f32 tool_r if(m_digging_anim > 0.5) frac = 2.0 * (m_digging_anim - 0.5); // This value starts from 1 and settles to 0 - f32 ratiothing = pow((1.0f - tool_reload_ratio), 0.5f); + f32 ratiothing = std::pow((1.0f - tool_reload_ratio), 0.5f); //f32 ratiothing2 = pow(ratiothing, 0.5f); f32 ratiothing2 = (easeCurve(ratiothing*0.5))*2.0; wield_position.Y -= frac * 25.0 * pow(ratiothing2, 1.7f); -- cgit v1.2.3