From 9bc40a31238e6be4959718ef9d8b6b4c1feb7633 Mon Sep 17 00:00:00 2001 From: Dan Ames Date: Thu, 23 Jan 2025 14:56:25 -0700 Subject: [PATCH] Update leaflet_great_circle.html fixing PI --- leaflet/leaflet_great_circle.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/leaflet/leaflet_great_circle.html b/leaflet/leaflet_great_circle.html index a9d4162..7357693 100644 --- a/leaflet/leaflet_great_circle.html +++ b/leaflet/leaflet_great_circle.html @@ -158,10 +158,10 @@

Enter Coordinates

//Function to compute the distance between two points using the Haversine formula function compute_distance(lat1,lng1,lat2,lng2){ //convert inputs to radians - rad_lat1 = lat1 * Math.pi()/180; - rad_lng1 = lng1 * Math.pi()/180; - rad_lat2 = lat2 * Math.pi()/180; - rad_lng2 = lng2 * Math.pi()/180; + rad_lat1 = lat1 * Math.PI()/180; + rad_lng1 = lng1 * Math.PI()/180; + rad_lat2 = lat2 * Math.PI()/180; + rad_lng2 = lng2 * Math.PI()/180; //Differences in coordinates const dLat = rad_lat2 - rad_lat1;