Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@extra-iterable/euclidean-distance

1.1.1 • Public • Published

Get euclidean distance between iterables.

const euclideanDistance = require('@extra-iterable/euclidean-distance');
// euclideanDistance(<iterable1>, <iterable2>)
 
euclideanDistance([0, 0], [3, 4]);
// 5
euclideanDistance([1, 2, 3], [4, 5, 6]);
// 5.196152422706632
euclideanDistance(new Set([1, 2]), [2]);
// NaN (iterables are of different lengths)

extra-iterable

install

npm i @extra-iterable/euclidean-distance

Downloadsweekly downloads

1

version

1.1.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability