Add RAYMATH_TYPES_DEFINED to check if Vector*/Matrix* is defined, that we can use RAYMATH_STANDALONE with raylib.h
This commit is contained in:
parent
c222e231f0
commit
4e91ae262e
|
|
@ -170,6 +170,9 @@
|
||||||
typedef enum { false, true } bool;
|
typedef enum { false, true } bool;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(RAYMATH_TYPES_DEFINED)
|
||||||
|
#define RAYMATH_TYPES_DEFINED
|
||||||
|
|
||||||
// Vector2 type
|
// Vector2 type
|
||||||
typedef struct Vector2 {
|
typedef struct Vector2 {
|
||||||
float x;
|
float x;
|
||||||
|
|
@ -201,6 +204,7 @@ typedef struct Matrix {
|
||||||
float m2, m6, m10, m14;
|
float m2, m6, m10, m14;
|
||||||
float m3, m7, m11, m15;
|
float m3, m7, m11, m15;
|
||||||
} Matrix;
|
} Matrix;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Color type, RGBA (32bit)
|
// Color type, RGBA (32bit)
|
||||||
typedef struct Color {
|
typedef struct Color {
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,8 @@
|
||||||
// Types and Structures Definition
|
// Types and Structures Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(RAYMATH_STANDALONE)
|
#if defined(RAYMATH_STANDALONE) && !defined(RAYMATH_TYPES_DEFINED)
|
||||||
|
#define RAYMATH_TYPES_DEFINED
|
||||||
// Vector2 type
|
// Vector2 type
|
||||||
typedef struct Vector2 {
|
typedef struct Vector2 {
|
||||||
float x;
|
float x;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user