Module:Sandbox/Hellknowz/Misc

local p = {}

function p.rand(max)

math.randomseed(mw.site.stats.edits)

if (max <= 2147483648) then

return math.random(max)

else

local ratio = max / 2147483648

local r1 = math.floor(math.random(2147483648-1) * ratio)

local r2 = math.random(math.ceil(ratio))

return r1 + r2

end

end

function p.random(frame)

return p.rand(0 + frame.args[1])

end

return p