Random
Show Deprecated
The Random data type generates pseudorandom numbers and directions.
Summary
Constructors
Methods
Returns a pseudorandom integer uniformly distributed over [min, max].
Returns a pseudorandom number uniformly distributed over [min, max).
Constructors
new
Parameters
Code Samples
Datatype.Random
local max = 2147483647 -- use a large integer
local seed = math.random(max)
local generator = Random.new(seed)