2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 11:47:43 +00:00

Various fmadds related fixes (may be more)

This commit is contained in:
2017-08-04 06:48:48 -07:00
parent 2f2ff96965
commit 69187353b9
5 changed files with 39 additions and 37 deletions

View File

@@ -43,11 +43,9 @@ public:
inline s32 Range(s32 min, s32 max)
{
s32 diff = max - min;
s32 rand = -1;
while (rand < 0)
rand = s32((Next() << 16) | Next());
return rand % diff + min;
s32 rnd = Next();
s32 diff = (max - min) + 1;
return min + (rnd - ((rnd / diff) * diff));
}
static CRandom16* GetRandomNumber() {return g_randomNumber;}