-
Notifications
You must be signed in to change notification settings - Fork 199
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
deprecate legacy line measure traits #1222
Conversation
414de5a
to
5a5aa7b
Compare
} | ||
|
||
#[allow(clippy::many_single_char_names)] | ||
struct HaversineIntermediateFillCalculation<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HaversineIntermediateFillCalculation
was cut/paste and renamed from haversine_intermediate::HaversineParams
here:
I also re-organized the methods, which were previously free methods, and are now instance methods. The actual implementation logic is identical.
@@ -36,7 +37,13 @@ impl Bearing<f64> for Geodesic { | |||
/// [geodesic line]: https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid | |||
/// [Karney (2013)]: https://arxiv.org/pdf/1109.4448.pdf | |||
fn bearing(origin: Point<f64>, destination: Point<f64>) -> f64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these implementations were copy/pasted (with some variable renaming) from the deprecated traits.
So, instead of the modern traits delegating to the deprecated traits, the deprecated traits now delegate to the modern ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, instead of the modern traits delegating to the deprecated traits, the deprecated traits now delegate to the modern ones.
Oh! The 2 exceptions to this are that the deprecated GeodesicBearing
and HaversineBearing
do not delegate to the modern traits. They have kept their legacy implementation in tact to preserve the fact that their output range is [-180...180], whereas all the modern Bearing traits have unified around [0...360].
See #1210 for more details.
…er moving implementation to modern traits Moved some implementation details from HaversineIntermediateFill to Haversine.
dcda3e4
to
5f6bc01
Compare
CHANGES.md
if knowledge of this change could be valuable to users.Deprecating the old call sites of {Haversine,Rhumb,Geodesic}x{Distance,Bearing,Destination,Intermediate} in favor of the new methods introduced in #1216
Moved some implementation details from HaversineIntermediateFill to Haversine.