index.js
function getSqDist(p1, p2) {

    var dx = p1[0] - p2[0],
        dy = p1[1] - p2[1];

    return dx * dx + dy * dy;
}
function getSqDist(p1, p2) {

    var dx = p1[0] - p2[0],
        dy = p1[1] - p2[1];

    return dx * dx + dy * dy;
}
function getSqDist ( p1 , p2 ) { var dx = p1 [ 0 ] - p2 [ 0 ] , dy = p1 [ 1 ] - p2 [ 1 ] ; return dx * dx + dy * dy ; }
square distance between 2 points
square distance between 2 points