euclidean-distance

Calculate the Euclidean distance been two points in 2D/3D/nD space.

Euclidean Distance

euclidean-distance is a browserify-friendly npm module for calculating the Euclidean distance been two points in 2D or 3D space.

npm install euclidean-distance --save
var d = require('euclidean-distance');
 
d([0,0], [1,0]);
// 1 
 
d([0,0], [3,2]);
// 3.605551275463989 
 
d([-7,-4,3], [17, 6, 2.5]);
// 26.004807247892 
npm test

WTFPL