spatium
v1.0.0
Published
Calculate the distance between two points.
Downloads
65
Readme
Spatium
Calculate the distance between two points.
Installation
$ npm install spatium
Example
import distance, { IPosition } from 'spatium';
const first: IPosition = [1205, 40];
const second: IPosition = [85, 575];
console.log(Math.floor(distance(first, second))); // 1241