Hblade, here's a quick explanation of what % does. This should help you understand how it works.
What % means is the remainder of division.
For example, if we write 304%3 the result will be 1.
Why is that? Because % checks how many times the whole 3 goes to the 304,
which is 101 times, and 101 * 3 = 303, so there is one left as a reminder.
And that reminder is what a calculation with % returns.
I hope this helps, see the PM I sent you, too!