From 45fb633c3ad22f8d539f7e279e110e86a6e66545 Mon Sep 17 00:00:00 2001 From: Simo Moujami Date: Wed, 10 Dec 2014 17:08:56 -0500 Subject: [PATCH] renamed intermediary variable --- lib/geo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/geo.js b/lib/geo.js index 71334af7..998ed933 100644 --- a/lib/geo.js +++ b/lib/geo.js @@ -254,8 +254,8 @@ function geoDistance(x1, y1, x2, y2, options) { 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]; }