Create a new Random instance.
The seed parameter is optional, if missing a random initial seed will be used.
Optional
seed: NumberInitial seed for the generator
Initial seed for the generator. If it is changed, the generator will restart.
Generate a non-negative pseudo-random float.
The generated float will be from the half-open interval [0,n).
If the optional parameter n is missing, 1
will be used instead.
The upper bound, 1
if missing.
Generate a non-negative pseudo-random integer.
The generated integer will be from the half-open interval [0,n).
If the optional parameter n is missing, Number.MAX_SAFE_INTEGER
will be used instead.
The upper bound, Number.MAX_SAFE_INTEGER
if missing.
Pseudo random number generator.