Skip to content

Instantly share code, notes, and snippets.

@jpdevries
Created January 2, 2016 02:46
Show Gist options
  • Save jpdevries/b91f17e5e8f2345945b6 to your computer and use it in GitHub Desktop.
Save jpdevries/b91f17e5e8f2345945b6 to your computer and use it in GitHub Desktop.
cool math in js
function distanceBetweenTwoPoints(_a,_b) {
return Math.sqrt(Math.pow(Math.abs(_a.y - _b.y),2) + Math.pow(Math.abs(_a.x - _b.x),2))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment