8.15.0.12
16.3 Random Number Generation
import: rhombus/random | package: rhombus-lib |
Annotation and constructors for a pseudo-random number generator (PRNG).
method | ||
| ||
method | ||
| ||
method | ||
Steps prng to obtain a number.
Using math.random is the same as using Random.current()’s Random.random method.
property | |||
A property for the state of prng.
context parameter | |
A context parameter for the pseudo-random number generator that is used by
math.random.
annotation | |
Satisfied by an array of 6 values where the first three values are
integers in the range 0 to 4294967086, inclusive,
and the last three integers are in the range 0 to
4294944442, inclusive.
Returns a list with the same elements as lst, but in a random
order, where rnd is used for randomization.
> shuffle([1, 2, 3, 4])
[1, 3, 4, 2]