Avoid unnecessary floating-point math