aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-08 08:29:14 -0700
committerChris Robinson <[email protected]>2013-10-08 12:39:22 -0700
commit11365b42c7fedaef61d7123c390c429260eae52f (patch)
treea4d2c61c8729c4b78b0de49fb12ce5018d7297ef /OpenAL32/Include/alu.h
parentb42fcce014da2c866a3d64f8f4831baed2f46e6f (diff)
Use helper macros to convert between degrees and radians
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 7327d85b..d27301b3 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -13,13 +13,16 @@
#endif
-#define F_PI (3.14159265358979323846f) /* pi */
-#define F_PI_2 (1.57079632679489661923f) /* pi/2 */
+#define F_PI (3.14159265358979323846f)
+#define F_PI_2 (1.57079632679489661923f)
#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))
+
#ifdef __cplusplus
extern "C" {