More languages
More actions
(Testing method for random number generator) |
m (Accepting arguments) |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p.randomNumber( | function p.randomNumber(frame) | ||
return math.random( | local min = tonumber(frame.args[1]) or 0 | ||
local max = tonumber(frame.args[2]) or 100 | |||
return math.random(min, max) | |||
end | end | ||
return p | return p |