Randomness
RNG Functions
rand
Returns a random float between 0 (inclusive) and 1 (exclusive).
randi
Returns a random integer that is either 0 or 1.
rand_range from to
Returns a random float between from
(inclusive) and to
(exclusive).
rand_rangei from to
Returns a random float between from
(inclusive) and to
(inclusive).
randi_range from to
Returns a random integer between from
(inclusive) and to
(exclusive).
randi_rangei from to
Returns a random integer between from
(inclusive) and to
(inclusive).
List Functions
shuffle list
Returns a new list with the elements of list
randomly rearranged.
Example:
choose list
Returns a randomly selected element from list
.
Example:
Noise Functions
noise1 n
Generates a noise value based on the input parameter n
. Accepts integer and float types.
Example:
noise2 n1 n2
Generates a noise value based on two input parameters n1
and n2
. Accepts integer and float types.
Example:
noise3 n1 n2 n3
Generates a noise value based on three input parameters n1
, n2
, and n3
. Accepts integer and float types.
Example:
noise4 n1 n2 n3 n4
Generates a noise value based on four input parameters n1
, n2
, n3
, and n4
. Accepts integer and float types.
Example:
Last updated