Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Centroid numerical stability #510

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

rmanoka
Copy link
Contributor

@rmanoka rmanoka commented Sep 8, 2020

This issue, and the fix is similar to the one we fixed earlier with Area. The centroid formula for polygons is quadratic in the coordinates, and has cancellation errors.

Also, added a test to verify stability.

This issue, and the fix is similar to the one fixed earlier
with `Area`.  The centroid formula for polygons is quadratic
in the coordinates, and has cancellation errors.

Also, added a test to verify stability.
Copy link
Member

@michaelkirk michaelkirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

LGTM - sorry for the slow review!

@bors
Copy link
Contributor

bors bot commented Sep 15, 2020

Build succeeded:

@bors bors bot merged commit 41baf51 into georust:master Sep 15, 2020
@rmanoka rmanoka deleted the fix/centroid-numerical-stability branch September 17, 2020 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants