diff options
author | Chris Robinson <[email protected]> | 2017-05-20 03:28:40 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-05-20 03:28:40 -0700 |
commit | c234b25ac7ace092867cc3348e7ea2b2754a7284 (patch) | |
tree | 7a1be43b6c8f3423ef56027f8bbe1f73e4f84641 /common/math_defs.h | |
parent | 492050b8168b04ef6df0030739969685a62d6929 (diff) |
Use more correct doppler shift calculations
Diffstat (limited to 'common/math_defs.h')
-rw-r--r-- | common/math_defs.h | 9 |
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 */ |