Static
randomSet the primary function to be called when generating any random numbers.
Set to Math.random by default.
Static
randomStatic
randomThe list of elements to be selected from.
A random element from the given list.
This method assumes an equal distribution for all elements of the list.
If an empty list is provided, the function will return undefined.
Static
randomStatic
randomStatic
randomStatic
randomStatic
randomThe list of elements to be selected from.
IMPORTANT: The sum of weights of the objects in this list should be equal to 1.0.
A random element from the given list.
The distribution of the choices will be determined by the weights of each
element in the list.
If an empty list is provided, the function will return undefined
.
If the sum of weights in the list is less than 1.0, the function will return undefined
.
A collection of static methods for retrieving random values.