Refactored relativeOffset().