@codewell/distance

Distance between two coordinates

Usage no npm install needed!

<script type="module">
  import codewellDistance from 'https://cdn.skypack.dev/@codewell/distance';
</script>

README

@codewell/distance

Calculates the distance between two coordinates {x: x1, y: y1} and {x: x2, y: y2}.

Installation

npm install @codewell/distance

Basic usage

import distance from '@codewell/distance';

const distance({x: 1, y: 1}, {x: 4, y: 5}); // => 5