Skip to content

Commit

Permalink
Update leaflet_great_circle.html
Browse files Browse the repository at this point in the history
fixing PI
  • Loading branch information
danames authored Jan 23, 2025
1 parent a6b0ae7 commit 9bc40a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions leaflet/leaflet_great_circle.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ <h2>Enter Coordinates</h2>
//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;
Expand Down

0 comments on commit 9bc40a3

Please sign in to comment.