Revert "Move coordinate scaling for offset from Perl to XS for better performance"

This reverts commit 8392c066237add1d8a017c74195ad7f6663bb933.