Static methods

staticarrayPick<T> (_array:Array<T>):Null<T>

Randomly picks an element in the array

Returns:

the content of a random position in the array

See:

staticarraySplice<T> (_array:Array<T>):Null<T>

Randomly picks an element in the array and remove it from the array

Returns:

the content of a random position in the array

See:

staticirange (_lowBound:Int, _highBound:Int):Int

Returns a random integer number between _lowBound and _highBound (included)

Parameters:

_lowBound

lower bound of the range to randomly pick from (included)

_highBound

higher bound of the range to randomly pick from (included)

Returns:

a random integer between _lowBound and _highBound

staticisBelow (_value:Float):Bool

Returns if a random value is (strictly) under the _value parameter

Parameters:

_value

chance to get a positive response

Returns:

true if the random generated value is (strictly) smaller than the value passed, false if the generated value is equal or greater than the value passed

staticrange (_lowBound:Float, _highBound:Float):Float

Returns a random float number between _lowBound and _highBound (included)

Parameters:

_lowBound

lower bound of the range to randomly pick from (included)

_highBound

higher bound of the range to randomly pick from (included)

Returns:

a random float between _lowBound and _highBound