aboutsummaryrefslogtreecommitdiff
path: root/common/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/math.h')
-rw-r--r--common/math.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/common/math.h b/common/math.h
index b85ec0d22a..f91f7a2eec 100644
--- a/common/math.h
+++ b/common/math.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -52,14 +52,6 @@
#endif
#endif
-#ifndef M_SQRT1_2
- #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
-#endif
-
-#ifndef M_PI
- #define M_PI 3.14159265358979323846
-#endif
-
#ifndef FLT_MIN
#define FLT_MIN 1E-37
#endif
@@ -116,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