Wilang Documentation1.0.0+4

randomInt#

Return a random integer number

Available in: math cells, REPL.

Syntax#

randomInt(max)
randomInt(min, max)
randomInt(size)
randomInt(size, max)
randomInt(size, min, max)

Arguments and behavior#

Upper bound is exclusive. The example checks range and integer type instead of predicting the draw. The example returns scalar (boolean).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
randomInt(1,7) >= 1 and randomInt(1,7) < 7

Expected result: true.

See also#

pickRandom · random

All functions · Math guides