Function vincenty_core::distance_from_points
source · pub fn distance_from_points(x1: f64, y1: f64, x2: f64, y2: f64) -> Result<f64>
Expand description
Calculate the geodesic distance in Km using points.
Arguments
x1
- An f64 representing latitude of point 1.y1
- An f64 representing longitude of point 1.x2
- An f64 representing latitude of point 2.y2
- An f64 representing longitude of point 2.
Returns
Result<f64>
- The geodesic distance between the points in kilometers. Returns an error if the approximation does not finish within the maximum number of iterations.