renamed intermediary variable
This commit is contained in:
parent
ed5aeb1d2d
commit
45fb633c3a
|
@ -254,8 +254,8 @@ function geoDistance(x1, y1, x2, y2, options) {
|
||||||
return Math.pow(Math.sin(a / 2.0), 2)
|
return Math.pow(Math.sin(a / 2.0), 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
var c = Math.sqrt(haversine(x2 - x1) + Math.cos(x2) * Math.cos(x1) * haversine(y2 - y1));
|
var f = Math.sqrt(haversine(x2 - x1) + Math.cos(x2) * Math.cos(x1) * haversine(y2 - y1));
|
||||||
|
|
||||||
return 2 * Math.asin(c) * EARTH_RADIUS[type];
|
return 2 * Math.asin(f) * EARTH_RADIUS[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue