mirror of
https://github.com/recp/cglm.git
synced 2025-12-24 20:34:58 +00:00
min and max util
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user