Generates a pseudo-random number. Alias for the standard library function math.random.
See also Lua library functions.
Signature:
randomNum = random([m [, n]])
Arguments:
m- First limit for randomly generated numbers (number)n- Second limit for randomly generated numbers (number)
Returns:
randomNum- If called without arguments, a uniform pseudo-random real number in the range [0,1); ifmis specified, a uniform pseudo-random integer in the range [1,m]; if bothmandnare specified, a uniform pseudo-random integer in the range [m,n] (number)
This function is defined in the Lua standard libraries