diff --git a/src/geo/LatLng.js b/src/geo/LatLng.js index c47a9f522..6f0c994a6 100644 --- a/src/geo/LatLng.js +++ b/src/geo/LatLng.js @@ -136,7 +136,7 @@ export class LatLng { } // @method distanceTo(otherLatLng: LatLng): Number - // Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines). + // Returns the distance (in meters) to the given `LatLng` calculated using the [Haversine formula](https://en.wikipedia.org/wiki/Haversine_formula). distanceTo(other) { return Earth.distance(this, new LatLng(other)); } diff --git a/src/geo/crs/CRS.Earth.js b/src/geo/crs/CRS.Earth.js index bed21d498..1c1e195c7 100755 --- a/src/geo/crs/CRS.Earth.js +++ b/src/geo/crs/CRS.Earth.js @@ -18,7 +18,7 @@ export class Earth extends CRS { // see https://rosettacode.org/wiki/Haversine_formula static R = 6371000; - // distance between two geographical points using spherical law of cosines approximation + // distance between two geographical points using Haversine approximation static distance(latlng1, latlng2) { const rad = Math.PI / 180, lat1 = latlng1.lat * rad,