summaryrefslogtreecommitdiffstats
path: root/src/hl2h.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-26 20:13:07 +0100
committersalmonik <salmonik@tuta.io>2026-10-26 20:13:07 +0100
commit300e7bc03b80dd4bac61330817bf6d9f04d4231b (patch)
tree7c35877edc58dae47045c33f8e1ff39182ab67cf /src/hl2h.cpp
parentFonts: bundle Liberation Sans and register it with fontconfig (diff)
downloadhl2h-300e7bc03b80dd4bac61330817bf6d9f04d4231b.tar.gz
hl2h-300e7bc03b80dd4bac61330817bf6d9f04d4231b.zip
Use one float-precision PI constant
- move PI_F into hl2h.h as constexpr 3.14159265f and remove the duplicated long-double-style literals from hl2h.cpp/esp.cpp - extra digits are compile-time only; float operations cost the same
Diffstat (limited to 'src/hl2h.cpp')
-rw-r--r--src/hl2h.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp
index f3aa26f..a49acc2 100644
--- a/src/hl2h.cpp
+++ b/src/hl2h.cpp
@@ -39,8 +39,6 @@ Vector g_cam_view{0, 0, 0};
39// vector math 39// vector math
40// --------------------------------------------------------------------------- 40// ---------------------------------------------------------------------------
41 41
42static constexpr float PI_F = 3.14159265358979323846f;
43
44QAngle vector_angles(const Vector &forward) { 42QAngle vector_angles(const Vector &forward) {
45 QAngle a{}; 43 QAngle a{};
46 a.z = 0; 44 a.z = 0;