From b805754aa17c87d413dd13bdac864a1aba5ee4f4 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 31 Jul 2021 18:10:26 +0200 Subject: REVIEWED: Avoid bool type collisions --- src/raylib.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/raylib.h') 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 #elif !defined(__cplusplus) && !defined(bool) typedef enum bool { false, true } bool; + #define RL_BOOL_TYPE #endif // Vector2, 2 components -- cgit v1.2.3