Ensure all numbers in range are able to be randomly drawn

This commit is contained in:
Sovereignty 2024-12-11 05:54:16 +00:00
parent b7af339c7a
commit 84f063c699

View file

@ -12,7 +12,7 @@ function module.new(n1: number, n2: number): { Values: { number }, Random: (self
print(n1, n2)
local first = math.min(n1, n2)
local last = math.max(n1, n2)
for index = math.floor(first), math.floor(last) do
for index = math.floor(first), math.floor(last + 1) do
table.insert(ranges, index)
end