Skip to content

[CORE] Unify raymath.h and raylib.h structure checks#5704

Closed
JeffM2501 wants to merge 2 commits into
raysan5:masterfrom
JeffM2501:raylib_check_math_structs
Closed

[CORE] Unify raymath.h and raylib.h structure checks#5704
JeffM2501 wants to merge 2 commits into
raysan5:masterfrom
JeffM2501:raylib_check_math_structs

Conversation

@JeffM2501
Copy link
Copy Markdown
Contributor

This PR makes raylib.h check to see if math types like Vector2/3 and matrix are defined before defining them, in the same way that raymath.h does. Previously raylib.h assumed it was always setting the structures, and this forces raylib.h to be included before raymath.h.
This PR makes the include order not matter, making it much easier to include external libs that may use raymath or raylib in any order.
This should not break any compatibly, the same flags are set, just in a slightly different order during compilation.

@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Mar 28, 2026

@JeffM2501 I prefer to avoid that change, one type should not be used if the other types are not defined

@raysan5 raysan5 closed this Mar 28, 2026
@JeffM2501
Copy link
Copy Markdown
Contributor Author

That's what this does, ensure that once one type is used, the other is not, it just makes raylib behave that same way as raymath.h.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants