renormalize coord to box