From 94f3f0a93db62fbdd957a29a9df155960391c323 Mon Sep 17 00:00:00 2001 From: otta8634 Date: Thu, 5 Dec 2024 21:17:48 +0800 Subject: [PATCH] Use M_PI_2 constant instead of PI / 2 --- qcsrc/client/hud/panel/physics.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud/panel/physics.qc b/qcsrc/client/hud/panel/physics.qc index de4c0813a..67bbc17e7 100644 --- a/qcsrc/client/hud/panel/physics.qc +++ b/qcsrc/client/hud/panel/physics.qc @@ -188,7 +188,7 @@ void HUD_Physics() prev_vel_z = vel_phys.z; prev_speed2d = speed2d; float time_frac = (time - jump_speed_time) / max(1, autocvar_hud_panel_physics_jumpspeed_time); - jump_speed_f = time_frac > 1 ? 0 : cos(time_frac * PI / 2); + jump_speed_f = time_frac > 1 ? 0 : cos(time_frac * M_PI_2); } } @@ -216,7 +216,7 @@ void HUD_Physics() else { float time_frac = (time - top_speed_time) / max(1, autocvar_hud_panel_physics_topspeed_time); - top_speed_f = time_frac > 1 ? 0 : cos(time_frac * PI / 2); + top_speed_f = time_frac > 1 ? 0 : cos(time_frac * M_PI_2); } } // topspeed progressbar peak -- 2.39.2