mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix last performance-type-promotion-in-math-fn problems
This commit is contained in:
parent
a90d27e1e2
commit
8e0b80aa36
11 changed files with 59 additions and 42 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue