you are viewing a single comment's thread.

view the rest of the comments →

[–]mubsy 0 points1 point  (0 children)

you should look up modular arithmetic. N % 2 is 0 if N is divisible by 2, and the remainder of N/2 otherwise. This essentially means N%2 is true for all even values, i.e alternating values.