Skip to content

Commit

Permalink
fix(computDestinationPoint): replace own earth radius with this.radius
Browse files Browse the repository at this point in the history
  • Loading branch information
Can Pekesen committed Dec 14, 2015
1 parent a62cda7 commit 5e335bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dist/geolib.js
Expand Up @@ -2,11 +2,11 @@
* Library to provide geo functions like distance calculation,
* conversion of decimal coordinates to sexagesimal and vice versa, etc.
* WGS 84 (World Geodetic System 1984)
*
*
* @author Manuel Bieh
* @url http://www.manuelbieh.com/
* @version 2.0.18
* @license MIT
* @license MIT
**/;(function(global, undefined) {

"use strict";
Expand Down Expand Up @@ -1226,7 +1226,7 @@
* @return object {latitude: destLat (in degree), longitude: destLng (in degree)}
*/
computeDestinationPoint: function(lat, lon, distance, bearing, radius) {
radius = (radius === undefined) ? 6371e3 : Number(radius);
radius = (radius === undefined) ? this.radius : Number(radius);

var δ = Number(distance) / radius; // angular distance in radians
var θ = Number(bearing).toRad();
Expand Down

0 comments on commit 5e335bb

Please sign in to comment.