Random Number | MATH_RANDOM
Syntax
MATH_RANDOM( [min = 0], [max] )
Parameters
min optional
A number that is the minimum value to be returned.
If the value is not a NUMBER, the FLOAT operation will be used to convert it.
max
A number that is the maximum value to be returned.
If the value is not a NUMBER, the FLOAT operation will be used to convert it.
Return Value
Returns a random number in the specified range.Description
Get a random value in a range. If only one value is provided it is used as the MAX and the MIN is set to 0.Examples
MATH_RANDOM() # returns 0
MATH_RANDOM(12) # returns a number between 0 and 12
MATH_FLOOR(10, 20) # returns a number between 10 and 20