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

@@ -24,25 +24,25 @@ glm_sign(int val) {
CGLM_INLINE
float
glm_rad(float deg) {
return deg * M_PI / 180.0f;
return deg * CGLM_PI / 180.0f;
}
CGLM_INLINE
float
glm_deg(float rad) {
return rad * 180.0f / M_PI;
return rad * 180.0f / CGLM_PI;
}
CGLM_INLINE
void
glm_make_rad(float *deg) {
*deg = *deg * M_PI / 180.0f;
*deg = *deg * CGLM_PI / 180.0f;
}
CGLM_INLINE
void
glm_make_deg(float *rad) {
*rad = *rad * 180.0f / M_PI;
*rad = *rad * 180.0f / CGLM_PI;
}
#endif /* cglm_util_h */