Random
class
Random
A random number generator based on .
Constructors
constructor
Parameters
-
state : number
Methods
floatArray
Get an array filled with random floats in the given range.
Parameters
-
size : numberThe size of the array.
-
from : number = 0The start of the range.
-
to : number = 1The end of the range.
intArray
Get an array filled with random integers in the given range.
Parameters
-
size : numberThe size of the array.
-
from : number = 0The start of the range.
-
to : number = 4294967296The end of the range. Exclusive.
nextFloat
Get the next random float in the given range.
Parameters
nextInt
Get the next random integer in the given range.
Parameters
spawn
public
spawn
():
Random
Create a new independent generator.