Creates a new AleaRNG
An optional string to seed the generation. Defaults to new Date() if not provided.
Returns a copy of the AleaRNG, with the seed and current step value.
Returns a number between [min, max). Use nextInt() for integers.
The min (inclusive). Default 0.
The max (exclusive). Default 1.
Returns a boolean.
Returns an integer between [min, max). Use next() for floats.
The min (inclusive). Default 0.
The max (exclusive). Default 100.
Returns a random item from the given array. This does not remove the item from the array, and multiple calls with the same array may yield the same item. If looking to randomize an array, use shuffle().
An array of items.
Resets the RNG to the original seed
Shuffles all values inside an array. Returns a copy, and does not edit the original.
An array of items
Generated using TypeDoc
AleaRNG is an implementation based on https://github.com/nquinlan/better-random-numbers-for-javascript-mirror Johannes Baagøe baagoe@baagoe.com, 2010