1.0.10 • Published 7 years ago

get-euclidean-distance v1.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

get-euclidean-distance

flipactual Travis Codecov Node NPM

Calculate euclidean distance in arbitrary dimensions

getEuclideanDistance(d) ⇒ Number

Find the euclidean distance between two points in arbitrary dimensions.

Kind: global function
Returns: Number - The euclidean distance between the points.

ParamTypeDescription
dArray.<Number>The distances between two points in each of the points' dimensions.

Example

const a = {
  x: 0.5,
  y: 0.1,
};
const b = {
  x: 0.25,
  y: 0.2,
};
getEuclideanDistance([
  b.x - a.x,
  a.y - b.y,
]);
// → 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

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago