Simple XorShift implementation.
public void Reinit(uint seed)
Reinitialize the PRNG with a seed.
WARNING: Don't do this to the microgame PRNG!!! This will lead to desyncs!!!
Arguments
public uint Next()
Get a random uint.
Returns: A random uint.
public int Range(int min, int max)
Get a random integer between min (incl.) and max (incl.).
Arguments
The min value. [min]
The max value. [max]
Returns: The random integer.
public uint Range(uint min, uint max)
Get a random unsigned integer between min (incl.) and max (incl.).
Arguments
The min value. [min]
The max value. [max]
Returns: The random unsigned integer.
public float Range(float min, float max)
Get a random floating point number between min (incl.) and max (incl.).
Arguments
The min value. [min]
The max value. [max]
Returns: The random floating point number.
public float RangeF(float min, float max)
Get a random floating point number between min (incl.) and max (incl.). Warning: From within Lua, use this one instead of the default Range one for floats due to shenanigans with operator overloading.
Arguments
The min value. [min]
The max value. [max]
Returns: The random floating point number.
public bool Chance(int chance)
Get a random bool with a [chance]% of it happening.
Arguments
Returns: The random bool.