As long as they're both positive, the remainder will be equal to the dividend. If one or both is negative, then you get reminded that %
is really the remainder operator, not the modulus operator. A modulus will always be positive, but a remainder can be negative.