function distance(x1, y1, x2, y2) {
return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
}
Created
February 14, 2014 19:18
-
-
Save gvn/9007204 to your computer and use it in GitHub Desktop.
Geometric Functions in Javascript
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment