Seed for RNG
Generates a random angle [0-360).
Random angle
Returns a random bool.
Random bool (true or false)
A roll of the dice.
Ex: chance(2, 5) returns true 50% of the time
Number of chances
Out of
If fate smiled upon you
Generates a random number.
Upper bound (exclusive)
Random number
Generates a random integer.
Upper bound (exclusive)
Random integer
Generates a random number within a given range.
Lower bound (inclusive)
Upper bound (exclusive)
Random number in range
Sets the RNG function to use.
Function to use
Generates a random sign.
Random sign (-1 or 1)
StaticstaticStaticangleGenerates a random angle [0-360).
Random angle
StaticboolReturns a random boolean.
Random boolean (true or false)
StaticchanceA roll of the dice.
Ex: chance(2, 5) returns true 50% of the time
Number of chances
Out of
If fate smiled upon you
StaticchooseStaticfloatGenerates a random number.
Upper bound (exclusive)
Random number
StaticintGenerates a random integer.
Upper bound (exclusive)
Random integer
StaticrangeGenerates a random number within a given range.
Lower bound (inclusive)
Upper bound (exclusive)
Random number in range
StaticresetSets the RNG function to the default (xorShift32).
StaticsetSets the default RNG function to use for instances of Random.
Function to use
StaticshuffleStaticsignGenerates a random sign.
Random sign (-1 or 1)
Staticvec2Staticvec3Staticvec4
A class with functions for randomness.