convert PI to float to suppress warnings

This commit is contained in:
Recep Aslantas
2017-01-14 12:22:23 +02:00
parent 68657ec2cc
commit 170e2e9fcc
4 changed files with 12 additions and 8 deletions

View File

@@ -50,7 +50,7 @@ glm_euler_angles(mat4 m, vec3 dest) {
int path;
a[0][1] = asinf(-m[0][2]);
a[1][1] = M_PI - a[0][1];
a[1][1] = CGLM_PI - a[0][1];
cy1 = cosf(a[0][1]);
cy2 = cosf(a[1][1]);
@@ -67,12 +67,12 @@ glm_euler_angles(mat4 m, vec3 dest) {
glm_vec_dup(a[path], dest);
} else {
dest[0] = atan2f(m[1][0], m[2][0]);
dest[1] = M_PI_2;
dest[1] = CGLM_PI_2;
dest[2] = 0.0f;
}
} else {
dest[0] = atan2f(-m[1][0], -m[2][0]);
dest[1] =-M_PI_2;
dest[1] =-CGLM_PI_2;
dest[2] = 0.0f;
}
}