From ebfe818d2eb3a5c4e27040f139ae3fb349f13865 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 22 Dec 2018 20:32:00 -0800 Subject: Fix narrowing conversion from double to float --- common/math_defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/math_defs.h') 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(M_PI/180.0); } +constexpr inline float Rad2Deg(float x) noexcept { return x * static_cast(180.0/M_PI); } #endif /* AL_MATH_DEFS_H */ -- cgit v1.2.3