get-euclidean-distance
Calculate euclidean distance in arbitrary dimensions
Number
getEuclideanDistance(d) ⇒ Find the euclidean distance between two points in arbitrary dimensions.
Kind: global function
Returns: Number
- The euclidean distance between the points.
Param | Type | Description |
---|---|---|
d | Array.<Number> |
The distances between two points in each of the points' dimensions. |
Example
const a = x: 05 y: 01;const b = x: 025 y: 02;;// → 0.26925824035672524
Scripts
test
– run the tests
npm run test
coverage
– generate and view code coverage as HTML
npm run coverage
lint
– lint the codebase
npm run lint
readme
– generate the README
npm run readme
compile
– compile the code
npm run compile
License
MIT @ Flip