Add cmd.cpp cmd.h, MA_LENGTHOF to MA_Lengthof

This commit is contained in:
Krzosa Karol
2024-03-04 15:26:15 +01:00
parent 2abd8870cb
commit 3f358584bb
7 changed files with 228 additions and 30 deletions

View File

@@ -129,7 +129,7 @@ MA_API void MA_SaveSourceLocEx(const char *file, int line);
#define MA_IS_POW2(x) (((x) & ((x)-1)) == 0)
#define MA_MIN(x, y) ((x) <= (y) ? (x) : (y))
#define MA_MAX(x, y) ((x) >= (y) ? (x) : (y))
#define MA_LENGTHOF(x) ((int64_t)((sizeof(x) / sizeof((x)[0]))))
#define MA_Lengthof(x) ((int64_t)((sizeof(x) / sizeof((x)[0]))))
#define MA_CLAMP_TOP(x, max) ((x) >= (max) ? (max) : (x))
#define MA_CLAMP_BOT(x, min) ((x) <= (min) ? (min) : (x))