Well, here is the code that I am using, simplified to remove all the tables...
order = 3
elements = order * order
size = elements * elements
for i = 0, (size - 1) do
r = math.floor(i / elements)
c = math.floor(i % elements)
b = math.floor(math.floor(math.floor(r / order) * order) +
math.floor(c / order))
br = math.floor(r % order)
bc = math.floor(c % order)
print(string.format("i:%f r: %f c: %f b:%f br:%f bc:%f", i, r, c, b, br, bc))
end
I would think that because all of the numbers that I am working with,
all the numbers would come out positive, but many of the resulting
'0's come out as -0. While I have tried to preliminary test to see if
"0 == -0", I am just wondering if by chance this is due to some
rounding error.