Skip to content

Conversation

@jmr
Copy link
Collaborator

@jmr jmr commented Nov 10, 2025

For tall (>90 degrees) and wide (>180 degrees) lat/lng rects, rect.CapBound returned an incorrect cap that didn't contain the full rect. The function intends to return a polar cap in this case, but due to an apparent typo (2 * Pi instead of Pi), returned a cap centered at the center of the rect instead.

This fix has recently been applied to C++ and Java in google3, but has not been exported to those github repos yet.

For tall (>90 degrees) and wide (>180 degrees) lat/lng rects,
rect.CapBound returned an incorrect cap that didn't contain the full
rect. The function intends to return a polar cap in this case, but due
to an apparent typo (2 * Pi instead of Pi), returned a cap centered at
the center of the rect instead.

This fix has recently been applied to C++ and Java in google3, but has
not been exported to those github repos yet.
@jmr jmr merged commit 2d428c1 into golang:master Nov 10, 2025
5 checks passed
@jmr jmr deleted the rect-cap-bound branch November 10, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants