aboutsummaryrefslogtreecommitdiffstats
path: root/common/math_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/math_defs.h')
-rw-r--r--common/math_defs.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/math_defs.h b/common/math_defs.h
index 149cf80b..8756488c 100644
--- a/common/math_defs.h
+++ b/common/math_defs.h
@@ -1,6 +1,7 @@
#ifndef AL_MATH_DEFS_H
#define AL_MATH_DEFS_H
+#include <math.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
@@ -13,7 +14,11 @@
#define FLT_EPSILON (1.19209290e-07f)
#endif
-#define DEG2RAD(x) ((ALfloat)(x) * (F_PI/180.0f))
-#define RAD2DEG(x) ((ALfloat)(x) * (180.0f/F_PI))
+#ifndef HUGE_VALF
+#define HUGE_VALF (1.0f/0.0f)
+#endif
+
+#define DEG2RAD(x) ((float)(x) * (F_PI/180.0f))
+#define RAD2DEG(x) ((float)(x) * (180.0f/F_PI))
#endif /* AL_MATH_DEFS_H */