Node.js examples for Geometry:Distance
Calculate distance between two points
function distance(a, b) { var dx = Math.abs(a.x - b.x); var dy = Math.abs(a.y - b.y); return Math.sqrt(dx * dx + dy * dy); }