View source for Module:Random
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
local seeded
local randomseed = math.randomseed
local random = math.random
function p.random( m, n )
if not seeded then
p.seed()
end
return random( n and m or m and 1 or 0, n or m or 1 )
end
function p.seed( seed )
randomseed( seed or ( os.time() + os.clock() * 1000000000 ) )
-- First few values of seed is not guaranteed to be random on some platforms
random()
random()
000
1:0
Templates used on this page:
Return to Module:Random.