mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[10556] Add frand function for random floats with min/max, similar to urand
This commit is contained in:
parent
802e01a494
commit
7d7bb3cfe6
3 changed files with 9 additions and 1 deletions
|
|
@ -36,6 +36,11 @@ uint32 urand (uint32 min, uint32 max)
|
|||
return mtRand->randInt (max - min) + min;
|
||||
}
|
||||
|
||||
float frand (float min, float max)
|
||||
{
|
||||
return mtRand->randExc (max - min) + min;
|
||||
}
|
||||
|
||||
int32 rand32 ()
|
||||
{
|
||||
return mtRand->randInt ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue