-
-
Notifications
You must be signed in to change notification settings - Fork 0
Matrix4 RotateX
Kion edited this page Sep 16, 2017
·
1 revision

void mat4_rotate_x(mat4 m, float x, mat4 dst) {
m[M_00] = 1.0f;
m[M_01] = 0.0f;
m[M_02] = 0.0f;
m[M_03] = 0.0f;
m[M_10] = 0.0f;
m[M_11] = cos(x);
m[M_12] =-sin(x);
m[M_13] = 0.0f;
m[M_20] = 0.0f;
m[M_21] = sin(x);
m[M_22] = cos(x);
m[M_23] = 0.0f;
m[M_30] = 0.0f;
m[M_31] = 0.0f;
m[M_32] = 0.0f;
m[M_33] = 1.0f;
}