commit f6c91155f8941bf709e49b1492fb2ad9a472fdc5 parent 1d475ef06a32131908f8a2f9ea8d9099f0d1c756 Author: Sergej Orlov <wladimirych@gmail.com> Date: Thu, 30 Mar 2017 12:09:28 +0300 [azimuth] fixed formula Diffstat:
M | src/lib/leaflet.control.azimuth/index.js | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/leaflet.control.azimuth/index.js b/src/lib/leaflet.control.azimuth/index.js @@ -27,7 +27,7 @@ function calcAzimuth(latlng1, latlng2) { const y = Math.sin(lng2 - lng1) * Math.cos(lat2); const x = Math.cos(lat1) * Math.sin(lat2) - - Math.sin(lat2) * Math.cos(lat2) * Math.cos(lng2 - lng1); + Math.sin(lat1) * Math.cos(lat2) * Math.cos(lng2 - lng1); let brng = Math.atan2(y, x); brng = degrees(brng); return brng;