FRandomBetween matching

This commit is contained in:
Dethrace Labs 2025-09-05 13:25:08 +12:00 committed by Dethrace Engineering Department
parent 81116169cf
commit 341025d8f0
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ int IRandomPosNeg(int pN) {
// IDA: float __cdecl FRandomBetween(float pA, float pB)
// FUNCTION: CARM95 0x004c16bf
float FRandomBetween(float pA, float pB) {
return (double)rand() * (pB - pA) / (double)RAND_MAX + pA;
return (float)rand() * (pB - pA) / (RAND_MAX + 1) + pA;
}
// IDA: float __cdecl FRandomPosNeg(float pN)