haversine_distance

Function haversine_distance 

Source
pub fn haversine_distance<P: GetXY, Q: GetXY>(a: &P, b: &Q) -> f64
Expand description

Assuming two points are on the surface of the earth as Lon-Lat coordinates, find the distance between them using the haversine formula. Returns the distance in degrees.

§Parameters

Both points require the GetXY trait to be implemented

  • a: The first point
  • b: The second point

§Returns

  • f64: The distance between the two points