diff options
author | Chris Robinson <[email protected]> | 2017-04-14 18:15:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-14 18:15:56 -0700 |
commit | afb59e7f98f40cde77c150414a8a5bd13f40781a (patch) | |
tree | 45ff03dd2eaec63563ff518a035967675b47bd55 /common/math_defs.h | |
parent | c5310d2e953c44eb33aa9bfa913e62adf11f20fd (diff) |
Move internal headers out of the include directory
Diffstat (limited to 'common/math_defs.h')
-rw-r--r-- | common/math_defs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/common/math_defs.h b/common/math_defs.h new file mode 100644 index 00000000..149cf80b --- /dev/null +++ b/common/math_defs.h @@ -0,0 +1,19 @@ +#ifndef AL_MATH_DEFS_H +#define AL_MATH_DEFS_H + +#ifdef HAVE_FLOAT_H +#include <float.h> +#endif + +#define F_PI (3.14159265358979323846f) +#define F_PI_2 (1.57079632679489661923f) +#define F_TAU (6.28318530717958647692f) + +#ifndef FLT_EPSILON +#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)) + +#endif /* AL_MATH_DEFS_H */ |