use_random_seed seed (number)
Resets the random number generator to the specified seed. All subsequently generated random numbers and randomisation functions such as shuffle
and choose
will use this new generator and the current generator is discarded. Use this to change the sequence of random numbers in your piece in a way that can be reproduced. Especially useful if combined with iteration. See examples.
Introduced in v2.0
# Example 1 | |
|
|
# Example 2 | |
|
|