Skip to content
Discussion options

You must be logged in to vote

This is intended behaviour.

raylib is a standalone library, and raymath was designed to work alongside it — though it can also be used standalone. For this reason, raymath checks whether each symbol is already defined before defining it. for exemple:

raylib/src/raymath.h

Lines 119 to 126 in b2ea5ea

#if !defined(RL_VECTOR2_TYPE)
// Vector2 type
typedef struct Vector2 {
float x;
float y;
} Vector2;
#define RL_VECTOR2_TYPE
#endif

raylib doesn't do the same, and as a standalone lib, it isn't required to. It instead sets defines after declaring its types, which raymath uses to detect them:

raylib/src/raylib.h

Lines 160 to 170 in b2ea5ea

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@CodeSmith32
Comment options

@raysan5
Comment options

@CodeSmith32
Comment options

@raysan5
Comment options

@CodeSmith32
Comment options

Answer selected by CodeSmith32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants