Fix a bug with large coordinates.

Rounding error made it possible for coordinates outside of [±180°, ±90°].