Do proper rounding when calculating direction