math_defs.h 418 B

12345678910111213141516171819
  1. #ifndef AL_MATH_DEFS_H
  2. #define AL_MATH_DEFS_H
  3. #ifdef HAVE_FLOAT_H
  4. #include <float.h>
  5. #endif
  6. #define F_PI (3.14159265358979323846f)
  7. #define F_PI_2 (1.57079632679489661923f)
  8. #define F_TAU (6.28318530717958647692f)
  9. #ifndef FLT_EPSILON
  10. #define FLT_EPSILON (1.19209290e-07f)
  11. #endif
  12. #define DEG2RAD(x) ((ALfloat)(x) * (F_PI/180.0f))
  13. #define RAD2DEG(x) ((ALfloat)(x) * (180.0f/F_PI))
  14. #endif /* AL_MATH_DEFS_H */