We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46046bf commit 02a5337Copy full SHA for 02a5337
1 file changed
src/physac.h
@@ -106,17 +106,18 @@
106
// NOTE: Below types are required for PHYSAC_STANDALONE usage
107
//----------------------------------------------------------------------------------
108
#if defined(PHYSAC_STANDALONE)
109
+ // Boolean type
110
+ #if defined(__STDC__) && __STDC_VERSION__ >= 199901L
111
+ #include <stdbool.h>
112
+ #elif !defined(__cplusplus) && !defined(bool)
113
+ typedef enum { false, true } bool;
114
+ #endif
115
+
116
// Vector2 type
117
typedef struct Vector2 {
118
float x;
119
float y;
120
} Vector2;
-
- // Boolean type
- #if !defined(_STDBOOL_H)
- typedef enum { false, true } bool;
- #define _STDBOOL_H
- #endif
121
#endif
122
123
typedef enum PhysicsShapeType { PHYSICS_CIRCLE, PHYSICS_POLYGON } PhysicsShapeType;
0 commit comments