aboutsummaryrefslogtreecommitdiffstats
path: root/include/math_defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/math_defs.h')
-rw-r--r--include/math_defs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/math_defs.h b/include/math_defs.h
new file mode 100644
index 00000000..d3c8b1b4
--- /dev/null
+++ b/include/math_defs.h
@@ -0,0 +1,15 @@
+#ifndef AL_MATH_DEFS_H
+#define AL_MATH_DEFS_H
+
+#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 */