0.0.4 • Published 5 years ago

distance-calculator-radians v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Distance Calculator Radians

This is a distance calculator library which is expecting two obj, one is point from which you want to calculate distance and other is target, upto which you want to calculate distance. Each obj expects two keys 'latitude' and 'longitude', which can be parse as a string or number. It will return you the distance between these two points.

Note: Distance is calculated in kilometers.

Installation

Use the package manager npm to install distance-calculator-radians.

npm install distance-calculator-radians

Usage

var distanceObj = require('distance-calculator-radians');

const pointObj = {
    latitude: 'point latitude',
    longitude: 'point longitude'
}

const targetObj = {
    latitude: 'target latitude',
    longitude: 'target longitude'
}
let distance = distanceObj.distanceCalculator(pointObj, targetObj);
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago