(foreign) class Random { uint32_t state[MTWIST_N]; uint32_t *next; int remaining; }
The Random
class provides access to the random number generator. Each
instance is completely separate from all others.
The constructor for this class takes a seed. If the seed provided is 0 or less,
then the current time (time(NULL)
in C) is used instead.
define <new>(seed: *Integer = 0): Random constructor
define between(lower: Integer, upper: Integer): Integer
Generate a random Integer
value between lower
and upper
.
ValueError
is raised if the range is empty, or reversed.