-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
203: fix polygon centroid for flat polygon r=urschrei a=antoine-de if the polygon is flat (area = 0), it is considered as a linestring for the centroid computation. without this for a flat polygon eg: A ----> B -----> C ^-------------------| the centroid was `Some(NaN, NaN)` without this, the test `empty_interior_polygon_test` was also causing a `panic!` because of the unwrap in the centroid method. Co-authored-by: Antoine D <antoine.desbordes@gmail.com>
- Loading branch information
Showing
1 changed file
with
37 additions
and
4 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