Rand32¶
The Rand32 class is a fast pseudo-random number generator that
generates a uniformly distributed sequence with a period length of
.
-
class
Rand32¶ Fast random-number generator that generates a uniformly distributed sequence with a period length of 2^32.
Public Functions
-
Rand32(unsigned long int seed = 0)¶ Constructor, given a seed.
-
void
init(unsigned long int seed)¶ Re-initialize with a given seed.
-
bool
nextb()¶ Get the next value in the sequence (range: [false, true])
-
unsigned long int
nexti()¶ Get the next value in the sequence (range: [0 … 0xffffffff])
-
float
nextf()¶ Get the next value in the sequence (range: [0 … 1[)
-
float
nextf(float rangeMin, float rangeMax)¶ Get the next value in the sequence (range [rangeMin … rangeMax[)
-