MikeD wrote:Unless i'm missing something, to divide you use / in PHP
Modulus is different than simple division. Division with / returns how many groups of x you can put y into, including the left-overs (remainder) as a decimal. Modulus or "mod" with %
only returns the remainder as an integer. Kind of like elementary school division where instead of figuring out the decimal, you just put an "R" and some number with what was left after you divided out the whole numbers.
Modulus is useful for a host of calculations, one of which is figuring when to move to the next row in an animation sheet calculation in traditional game development
