Move rounding to before converting to integers.