[10556] Add frand function for random floats with min/max, similar to urand

This commit is contained in:
DasBlub 2010-09-29 22:04:44 +02:00
parent 802e01a494
commit 7d7bb3cfe6
3 changed files with 9 additions and 1 deletions

View file

@ -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 ();