Class Random

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.

constructor(seed: *Integer): Random

public define between(lower: Integer, upper: Integer): Integer

Generate a random Integer value between lower and upper (inclusive).

public define double: Double

Generate a random Double value in the range [0, 1).

public define double_between(lower: Double, upper: Double): Double

Generate a random Double value between lower and upper.