Functions | |||
void | initrand (UINT16 seed) | ||
Initalise the random number generator. More... | |||
INT8 | rand (void) | ||
Returns a random value. | |||
UINT16 | randw (void) | ||
Returns a random word. | |||
void | initarand (UINT16 seed) | ||
Random generator using the linear lagged additive method Note that 'initarand()' calls 'initrand()' with the same seed value, and uses 'rand()' to initialize the random generator. More... | |||
INT8 | arand (void) | ||
Generates a random number using the linear lagged additive method. |
void initrand (UINT16 seed) |
Initalise the random number generator.
seed needs to be different each time, else the same sequence will be generated. A good source is the DVI register.
void initarand (UINT16 seed) |
Random generator using the linear lagged additive method Note that 'initarand()' calls 'initrand()' with the same seed value, and uses 'rand()' to initialize the random generator.