-
Notifications
You must be signed in to change notification settings - Fork 0
distance
Subhajit Sahu edited this page Aug 8, 2022
·
2 revisions
Calculate the distance between two points.
function distance(xs, ys)
// xs: first point ([x, y, z, ...])
// ys: second point ([x, y, z, ...])
const xmath = require('extra-math');
xmath.distance([2, -6], [7, 3]);
// → 10.295630140987
xmath.distance([7, 4, 3], [17, 6, 2]);
// → 10.246950765959598