distance-component

get the distance between two points

npm install distance-component
4 downloads in the last month

distance

Find the distance between two points

Installation

Install with component(1):

$ component install component/distance

API

distance(x1, y1, x2, y2)

Get the distance between two points

distance(0, 4, 3, 0) // 5

License

MIT

npm loves you