Go to the source code of this file.
Functions | |
void | RandomInit (void) |
Should be called before calling other random functions. | |
int | RandomRange (int min, int max) |
Returns a number between the min and max (inclusive). | |
long | RandomLong (void) |
Returns a random long integer. | |
double | RandomDouble (void) |
Returns a random double from 0 - 1. | |
double | RandomGaussian (double mean, double stdev) |
Samples from a Gaussian with the specified parameters. | |
double | RandomStandardNormal (void) |
Samples from the standard normal distribution. | |
void | RandomSeed (unsigned int seed) |
Seeds the random number generator. | |
void * | RandomNewState (unsigned int seed) |
Creates a new random state to use with RandomSetState. | |
void * | RandomSetState (void *state) |
Sets the current random state. | |
void | RandomFreeState (void *state) |
Use this to free any state made with RandomNewState. |
|
Returns a random double from 0 - 1.
|
|
Use this to free any state made with RandomNewState.
|
|
Samples from a Gaussian with the specified parameters.
|
|
Should be called before calling other random functions.
|
|
Returns a random long integer.
|
|
Creates a new random state to use with RandomSetState. Each state represents a separate stream of repeatable random numbers. This is implemented with initstate and setstate on Unix and is currently not supported on windows. |
|
Returns a number between the min and max (inclusive).
|
|
Seeds the random number generator.
|
|
Sets the current random state. The state parameter should have been made by RandomNewState. This allows you to have multiple repeatable random number sequences at once. Returns the previous state. |
|
Samples from the standard normal distribution.
|