summaryrefslogtreecommitdiffhomepage
path: root/src/raylib.h
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-07-31 18:10:26 +0200
committerraysan5 <[email protected]>2021-07-31 18:10:26 +0200
commitb805754aa17c87d413dd13bdac864a1aba5ee4f4 (patch)
treeb22d91b6bb2440d50fafa61425b44d5c7b8ca222 /src/raylib.h
parent0f8cfd603193d3bba45bdf0c073277600de2bc06 (diff)
downloadraylib-b805754aa17c87d413dd13bdac864a1aba5ee4f4.tar.gz
raylib-b805754aa17c87d413dd13bdac864a1aba5ee4f4.zip
REVIEWED: Avoid bool type collisions
Diffstat (limited to 'src/raylib.h')
-rw-r--r--src/raylib.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/raylib.h b/src/raylib.h
index f3d56a01..facad993 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -102,9 +102,12 @@
#ifndef PI
#define PI 3.14159265358979323846f
#endif
-
-#define DEG2RAD (PI/180.0f)
-#define RAD2DEG (180.0f/PI)
+#ifndef DEG2RAD
+ #define DEG2RAD (PI/180.0f)
+#endif
+#ifndef RAD2DEG
+ #define RAD2DEG (180.0f/PI)
+#endif
// Allow custom memory allocators
#ifndef RL_MALLOC
@@ -184,6 +187,7 @@
#include <stdbool.h>
#elif !defined(__cplusplus) && !defined(bool)
typedef enum bool { false, true } bool;
+ #define RL_BOOL_TYPE
#endif
// Vector2, 2 components