Random
class in package klyn.math

    public class Random<FLOAT_TYPE extends AbstractFloat = Double>:

Random

Pseudo-random number utilities.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public static | choice `choice<T>(values as IList<T>) as T:` | Returns a random element from a non-empty read-only list.
public static native | fillRandom `fillRandom(values as ArrayList<FLOAT_TYPE>, count as Int) as Void` | Fills an ArrayList with random floating values in [0, 1).
public static native | randInt `randInt(min as Int, max as Int) as Int` | Returns a random integer in [min, max].
public static | randInt `randInt(min as Long, max as Long) as Long:` | Returns a random long integer in [min, max].
public static | randInt `randInt(min as UInt, max as UInt) as UInt:` | Returns a random unsigned integer in [min, max].
public static | randRange `randRange(min as FLOAT_TYPE, max as FLOAT_TYPE) as FLOAT_TYPE:` | Returns a random value in [min, max).
public static native | random `random() as FLOAT_TYPE` | Returns a random value in [0, 1).
public static | shuffle `shuffle<T>(values as List<T>) as Void:` | Randomly shuffles a mutable list in-place.