0.1.1 • Published 5 years ago

haversine-dist v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Fast, minimalist library to calculate distance between two points.

Quick Start

	var haversine = require('haversine-dist');
	var dist = haversine.calculate([42.484239, -83.460072], [42.482562, -83.471546], 'feet');

Installation

Run npm install -g haversine-dist

Parameters

  1. First parameter is an array with the lat, then the long of the first point

  2. Second parameter is an array with the lat, then the long of the second point

  3. Third parameter is unitOfMeasure - feet, km, or miles. miles is the default.

Returns

The distance