From ec6f00ed1d9a27dd56bc06a723e72cfbdf4e0304 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 2 Jun 2014 01:00:15 +0200 Subject: COMMON: Make Rad<->Deg conversion use float constants. Since we take a float parameter and return a float value we will also just work on float values all the way. This silences some float conversion warnings. --- common/math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/math.h b/common/math.h index 04a0ba14fc..f91f7a2eec 100644 --- a/common/math.h +++ b/common/math.h @@ -108,11 +108,11 @@ inline int intLog2(uint32 v) { #endif inline float rad2deg(float rad) { - return rad * 180.0 / M_PI; + return rad * 180.0f / (float)M_PI; } inline float deg2rad(float deg) { - return deg * M_PI / 180.0; + return deg * (float)M_PI / 180.0f; } } // End of namespace Common -- cgit v1.2.3