This should also include a check to ensure roundFocusToNextPosition === roundAnchorToNextPosition. If they are different, the rounding could possibly lead to different answers.