aboutsummaryrefslogtreecommitdiffstats
path: root/common/math_defs.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-22 20:32:00 -0800
committerChris Robinson <[email protected]>2018-12-22 20:32:00 -0800
commitebfe818d2eb3a5c4e27040f139ae3fb349f13865 (patch)
tree754a905c80e4f7b4378899468cc592384cbf11a8 /common/math_defs.h
parentbfa98be48a4e84902d4c4bb2836f58cbbf582583 (diff)
Fix narrowing conversion from double to float
Diffstat (limited to 'common/math_defs.h')
-rw-r--r--common/math_defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/math_defs.h b/common/math_defs.h
index 4686e96b..6471e2e7 100644
--- a/common/math_defs.h
+++ b/common/math_defs.h
@@ -13,7 +13,7 @@
#define SQRTF_3 1.73205080756887719318f
-constexpr inline float Deg2Rad(float x) noexcept { return x * float{M_PI/180.0}; }
-constexpr inline float Rad2Deg(float x) noexcept { return x * float{180.0/M_PI}; }
+constexpr inline float Deg2Rad(float x) noexcept { return x * static_cast<float>(M_PI/180.0); }
+constexpr inline float Rad2Deg(float x) noexcept { return x * static_cast<float>(180.0/M_PI); }
#endif /* AL_MATH_DEFS_H */