mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Core/Shared: Change rand32 to return uin32 instead of int32
Fixes a crash that happened when rand32 returned negative values. Also updated some related comments that were outdated since we changed to SFMT. Closes #12638
This commit is contained in:
@@ -63,17 +63,17 @@ float frand(float min, float max)
|
||||
return float(GetRng()->Random() * (max - min) + min);
|
||||
}
|
||||
|
||||
int32 rand32()
|
||||
uint32 rand32()
|
||||
{
|
||||
return int32(GetRng()->BRandom());
|
||||
return GetRng()->BRandom();
|
||||
}
|
||||
|
||||
double rand_norm(void)
|
||||
double rand_norm()
|
||||
{
|
||||
return GetRng()->Random();
|
||||
}
|
||||
|
||||
double rand_chance(void)
|
||||
double rand_chance()
|
||||
{
|
||||
return GetRng()->Random() * 100.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user