Wilang Documentation1.0.0+4

random#

Return a random number.

Available in: math cells, REPL.

Syntax#

random()
random(max)
random(min, max)
random(size)
random(size, max)
random(size, min, max)

Arguments and behavior#

Returns a random value; no fixed sample is promised. The example checks its range instead of asserting an exact draw. The example returns scalar (boolean).

Example#

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

Example
random() >= 0 and random() < 1

Expected result: true.

See also#

pickRandom · randomInt

All functions · Math guides