Refactor and add reflections
This commit is contained in:
14
src/math/math_utils.c
Normal file
14
src/math/math_utils.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "math/math_utils.h"
|
||||
#include "c_cpp_aliases/aliases.h"
|
||||
|
||||
f32 clamp(f32 value, f32 min, f32 max) {
|
||||
if (value < min) {
|
||||
return min;
|
||||
}
|
||||
|
||||
if (value > max) {
|
||||
return max;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
Reference in New Issue
Block a user