Explore more
Functions

Math variables

3min

Use math variables to insert a random number into your functions.

random

Returns a floating-point, pseudo-random number in the range [01) (inclusive of 0, but not 1).

Use the following formula to generate an integer pseudo-random number in the range [minmax] (inclusive of both, min and max):

Math variable - random

Text


Example

Roll the dice

You can employ the random variable to create a dice game that randomly picks a number, for example between 1 and 6, and then returns that number to a user.

1

In the mapping panel of the Tools > Set variable module, select the Math functions tab.

Random math variable

2

Select the floor function.

3

Insert the following:

Text