Anonymous user
Unbias a random generator: Difference between revisions
→{{header|Lua}}: redefined randN to not check that bias is within range or store chance
(added Lua example) |
(→{{header|Lua}}: redefined randN to not check that bias is within range or store chance) |
||
Line 185:
<lang lua>
local function randN(n)
return function()
if math.random() <
end
end
|