Skip to content

Commit

Permalink
fixup! Move all geometries impls into impl Distance for Euclidean
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Oct 22, 2024
1 parent 06c484d commit f09257e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions geo/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
Before:
```
use geo::{GeodesicBearing, HaversineBearing, GeodesicDistance, HaversineDistance};
GeodesicBearing::geodesic_bearing(p1, p2)
HaversineBearing::haversine_bearing(p1, p2)
GeodesicDistance::geodesic_distance(p1, p2)
HaversineDistance::haversine_distance(p1, p2)
p1.geodesic_bearing(p2)
p1.haversine_bearing(p2)
p1.geodesic_distance(p2)
p1.haversine_distance(p2)
p1.euclidean_distance(p2)
```

After:
Expand All @@ -36,6 +37,7 @@
Haversine::bearing(p1, p2)
Geodesic::distance(p1, p2)
Haversine::distance(p1, p2)
Euclidean::distance(p1, p2)
```
* <https://github.com/georust/geo/pull/1216>
* Deprecated legacy line measure traits in favor of those added in the previous changelog entry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ impl<F: CoordFloat> Distance<F, Point<F>, Point<F>> for Euclidean {
/// );
/// ```
///
/// [`Haversine`]: super::Haversine
/// [`Geodesic`]: super::Geodesic
/// [metric spaces]: super
/// [`Haversine`]: crate::line_measures::metric_spaces::Haversine
/// [`Geodesic`]: crate::line_measures::metric_spaces::Geodesic
/// [metric spaces]: crate::line_measures::metric_spaces
fn distance(origin: Point<F>, destination: Point<F>) -> F {
Self::distance(origin.0, destination.0)
}
Expand Down

0 comments on commit f09257e

Please sign in to comment.