What does the % in a calculation? I can\'t seem to work out what it does.
%
Does it work out a percent of the calculation for example: 4 % 2
4 % 2
It's a modulo operation, except when it's an old-fashioned C-style string formatting operator, not a modulo operation. See here for details. You'll see a lot of this in existing code.