9.0.0.10
17.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 integers where the first three integers
are Int.in(0 .. = 4294967086) and the last three
integers are Int.in(0 .. = 4294944442).
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]