HERE'S an excellent write up on using integer math. Hope it helps.