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

Adds GeodesicDestination and GeodesicBearing #991

Merged
merged 9 commits into from
Mar 7, 2023

Conversation

phayes
Copy link
Contributor

@phayes phayes commented Mar 6, 2023

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

This adds the following:

  1. GeodesicDestination trait to complement the HaversineDestination trait
  2. GeodesicBearing trait to complement the Bearing trait
  3. Adds missing documentation for the GeodesicIntermediate trait

@michaelkirk
Copy link
Member

LGTM - but I'll leave it open a bit in case anyone else wants to comment.

GeodesicBearing trait to complement the Bearing trait

Not in this pull request, but I wonder if in the future we should rename the Bearing to something unambiguous like HaversineBearing

@michaelkirk michaelkirk mentioned this pull request Mar 6, 2023
2 tasks
assert_eq!(p_2, Point::new(9.27411867078536, 48.8403266058781));

let expected = Point::new(9.27411867078536, 48.8403266058781);
assert_relative_eq!(p_2.x(), expected.x(), epsilon = 1.0e-6);
Copy link
Member

Choose a reason for hiding this comment

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

Since we've implemented some approx traits for Point, you should be able to just assert_relative_eq(p2, expected, epsilon = 1.e-6).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I didn't know that! Good catch. Fixed

@michaelkirk
Copy link
Member

bors r+

I'm going to merge this, and plan to include it in geo-0.24.0, which I'll plan to publish tomorrow unless I hear otherwise.

@bors
Copy link
Contributor

bors bot commented Mar 7, 2023

Build succeeded:

@bors bors bot merged commit 8cb7a3f into georust:main Mar 7, 2023
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