min and max util

This commit is contained in:
Recep Aslantas
2017-12-30 17:50:53 +03:00
parent 99669a21a4
commit 634e1170a3

View File

@@ -61,4 +61,20 @@ glm_pow2(float x) {
return x * x;
}
CGLM_INLINE
float
glm_min(float a, float b) {
if (a < b)
return a;
return b;
}
CGLM_INLINE
float
glm_max(float a, float b) {
if (a < b)
return a;
return b;
}
#endif /* cglm_util_h */