Clean up special item drop mgr (#87)

* Clean up special item drop mgr

* Progress

* Mostly matching

* Docs
This commit is contained in:
robojumper
2024-11-06 22:43:27 +01:00
committed by GitHub
parent 9334796eef
commit aaf88fa648
11 changed files with 548 additions and 87 deletions
+8 -1
View File
@@ -11,7 +11,14 @@ 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;
}
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));
}