pub fn calculate_haversine_distance<T>(
point_a: Point2<T>,
point_b: Point2<T>,
sphere_radius: T,
) -> T
Expand description
Calculates the Haversine distance between two points on a sphere using floating-point arithmetic.
§Arguments
point_a
: A [`Point2’] representing the first geographical point.point_b
: APoint2
representing the second geographical point.sphere_radius
: AT
representing the radius of the sphere, typically the Earth’s radius in kilometers or miles.
§Generics
§Returns
A ‘T’, the distance between point_a
and point_b
along the surface of the sphere, using the Haversine formula.