pub fn comparable_distance<A, B>(
a: &A,
b: &B,
) -> <<DefaultDistanceStrategy<A, B> as DistanceStrategy<A, B>>::Comparable as DistanceStrategy<A, B>>::Outwhere
A: Geometry,
B: Geometry,
<<<A as Geometry>::Point as Point>::Cs as CoordinateSystem>::Family: DefaultDistance<<<<B as Geometry>::Point as Point>::Cs as CoordinateSystem>::Family>,
DefaultDistanceStrategy<A, B>: DistanceStrategy<A, B> + Default,Expand description
Comparable distance — equivalent ordering, cheaper math.
Mirrors boost::geometry::comparable_distance(g1, g2) from
boost/geometry/algorithms/comparable_distance.hpp. The result
preserves the ordering of distance but skips work the ordering
does not need (e.g. the final sqrt for Pythagoras). The
comparable companion of the default strategy is selected via
DistanceStrategy::Comparable, the Rust analogue of Boost’s
boost::geometry::strategy::distance::services::comparable_type<…>::type.