Calculate the Euclidean distance been two points in 2D/3D/nD space.
between two vectors in n-dimensional space.
npm install euclidean-distance --save
var distance =// 1// 3.605551275463989// 26.004807247892// 34.17601498127012
For some purposes you may actually be looking for the square of the distance. For that, you can use:
var distanceSquared =// 4