forked from golang/geo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s2: Fix a bug in Polygon.initLoopProperties.
Before this change to initLoopProperties to start the bounds as an EmptyRect instead of it defaulting to the zero rect, the bounds computations failed. This is because C++ gets default constructors on Rect which default to Empty. The bounds Union checks were doing Lo checks of the Min of 0 and the other, and Hi would to Max of 0 and the other. So polygons that had low corners above zero or high corners below zero would end up with oversized bounds. The same logic on updating bounds was in decodeCompressed. The TODO there was to do the right way once it was addded which it was a while back. Signed-off-by: David Symonds <[email protected]>
- Loading branch information
Showing
2 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters