@caeser1996/haversine

Calculate distance between Two Coordinates using haversine

Usage no npm install needed!

<script type="module">
  import caeser1996Haversine from 'https://cdn.skypack.dev/@caeser1996/haversine';
</script>

README

@caeser1996/haversine

npm (scoped) npm bundle size (minified)

Calculate distance between Two Coordinates using haversine.

Install

$ npm install @caeser1996/haversine

Usage

const haversine = require("@caeser1996/haversine");


let coords1=[24.20,32.20] //[long,lat]
let coords2 =[32.20,45.20]//[long,lat]


haversine(coords1,coords2,false);//false if you want it in kms

1601.612304937011