The modulus operator seems odd. Does it exist because of integer truncation?