/// <summary> /// Computes the approximate distance in meters between two locations, and optionally the initial and final bearings of the shortest path between them. /// Distance and bearing are defined using the WGS84 ellipsoid. /// /// The computed distance is stored in results[0]. /// If results has length 2 or greater, the initial bearing is stored in results[1]. /// If results has length 3 or greater, the final bearing is stored in results[2]. /// </summary> /// <param name="startLatitude"></param> /// <param name="startLongitude"></param> /// <param name="endLatitude"></param> /// <param name="endLongitude"></param> /// <param name="results"></param> public static void DistanceBetween( double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results) { if (AGUtils.IsNotAndroidCheck()) { return; } if (results == null || results.Length < 1) { throw new ArgumentException("results is null or has length < 1"); } LocationUtils.ComputeDistanceAndBearing(startLatitude, startLongitude, endLatitude, endLongitude, results); }