unsafe class RandomThe Random class provides a pseudorandom number generator.
Random is in the Prelude, meaning it is always available and does not need to be imported.
new()Constructs a new Random instance.
nextInt() -> intReturns a random integer value.
nextInt(bound: int) -> intReturns a random integer value between 0 (inclusive) and bound (exclusive).
nextInt(origin: int, bound: int) -> intReturns a random integer value between origin (inclusive) and bound (exclusive).
nextReal() -> realReturns a random real value between 0.0 (inclusive) and 1.0 (exclusive).
nextReal(bound: real) -> realReturns a random real value between 0.0 (inclusive) and bound (exclusive).
nextReal(origin: real, bound: real) -> realReturns a random real value between origin (inclusive) and bound (exclusive).
threadLocal() -> RandomReturns a thread-local Random instance, re-using a previous instance if available.