Trying to map a 2d array into a disk

I am not saying the thing you are saying
I am saying that you only need to check X > A and X < B, so if you check for
X>A and (if (B>M or B<A) then (X%M < B%M or X<M) else X<B)
it DOES work. (M is the boundary to modulo by)

(to be more clear, in your example you are comparing X to A twice, so its useless regardless of modulo as it can never return true ever…)

2 Likes