mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
fix axis rotations
This commit is contained in:
@@ -161,7 +161,7 @@ glm_rotate_x(mat4 m, float rad, mat4 dest) {
|
|||||||
t[2][1] = -sinVal;
|
t[2][1] = -sinVal;
|
||||||
t[2][2] = cosVal;
|
t[2][2] = cosVal;
|
||||||
|
|
||||||
glm_mat4_mul(t, m, dest);
|
glm_mat4_mul(m, t, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
@@ -179,7 +179,7 @@ glm_rotate_y(mat4 m, float rad, mat4 dest) {
|
|||||||
t[2][0] = sinVal;
|
t[2][0] = sinVal;
|
||||||
t[2][2] = cosVal;
|
t[2][2] = cosVal;
|
||||||
|
|
||||||
glm_mat4_mul(t, m, dest);
|
glm_mat4_mul(m, t, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
@@ -197,7 +197,7 @@ glm_rotate_z(mat4 m, float rad, mat4 dest) {
|
|||||||
t[1][0] = -sinVal;
|
t[1][0] = -sinVal;
|
||||||
t[1][1] = cosVal;
|
t[1][1] = cosVal;
|
||||||
|
|
||||||
glm_mat4_mul(t, m, dest);
|
glm_mat4_mul(m, t, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
|
|||||||
Reference in New Issue
Block a user