0.1.0 • Published 10 years ago

haversort v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
10 years ago

haversort

An implementation of a haversine algorhythm for finding the distance, in KM, between two latitudes and longtudes on Earth.

Usage

npm install -S haversort

> var h = require('haversort');
> h.distanceSort(10, 10, [[18,18], [12,12], [13,13], [14,14]]);
[ [ 12, 12, 312 ],
  [ 13, 13, 467.5 ],
  [ 14, 14, 622.8 ],
  [ 18, 18, 1240.3 ] ]
> h.haversine(10, 10, 20, 20);
1546.5

API

generated with docme

##License & Copyright Copyright (c) 2014 Todd Kennedy, licensed under the MIT License