Returns
A number, the square of the distance between the two points (x1, y1) and (x2, y2).
Description
Calculates the square of the distance between the two points (x1, y1) and (x2, y2) using ((x2-x1)*(x2-x2)+(y2-y1)*(y2-y1)).
Sample
Math.distanceSq(1,1,10,10); // returns 162
Math.distanceSq(3,5,30,40); // returns 1954
Note: Requires Advanced Math Support. See here for more information