Add ROT_X and ROT_Z macros

This commit is contained in:
Camden Dixie O'Brien committed 2025-09-27 14:43:25 +01:00
1 parent d1f29580ae
commit f265d3777d
1 file changed
+16
+16
View File
@@ -46,6 +46,14 @@ static const uint16_t indices[] = { 0, 1, 2, 2, 3, 0 };
x, y, z, 1, \
}
#define ROT_X(a) \
{ \
1, 0, 0, 0, \
0, cosf(a), sinf(a), 0, \
0, -sinf(a), cosf(a), 0, \
0, 0, 0, 1, \
}
#define ROT_Y(a) \
{ \
cosf(a), 0, -sinf(a), 0, \
@@ -53,6 +61,14 @@ static const uint16_t indices[] = { 0, 1, 2, 2, 3, 0 };
sinf(a), 0, cosf(a), 0, \
0, 0, 0, 1, \
}
#define ROT_Z(a) \
{ \
cosf(a), sinf(a), 0, 0, \
-sinf(a), cosf(a), 0, 0, \
0, 0, 1, 0, \
0, 0, 0, 1, \
}
// clang-format on
static void