Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function lerp(m, a, b)
- return (b - a) * m + a
- end
- local generations = {}
- for generation = 0, 10000 do
- local result = math.random()
- for _, num in pairs(generations) do
- if num > result then
- result = lerp(0.5, result, num)
- end
- end
- table.insert(generations, result)
- end
- print(generations[#generations])
Advertisement
Add Comment
Please, Sign In to add comment