Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-thomas774 committed Nov 6, 2024
1 parent aaf88fa commit 25f6797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/c/c_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ int rndInt(int max);
f32 rndF(f32 max);
f32 rndFX(f32 amp);

template <typename T>
template <typename T>
T rndRange(T min, T max) {
f32 r = cM::rndF(max - min);
f32 m = min;
m += r;
return m;
}

template <typename T>
inline T minMaxLimit(T val, T min, T max) {
return (T)((T)val < (T)min ? (T)min : ((T)val > (T)max ? (T)max : (T)val));
}
Expand Down

0 comments on commit 25f6797

Please sign in to comment.