Skip to content

Instantly share code, notes, and snippets.

@calvinmetcalf
Last active December 22, 2015 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calvinmetcalf/6438953 to your computer and use it in GitHub Desktop.
Save calvinmetcalf/6438953 to your computer and use it in GitHub Desktop.
fn getSquareDistance( p1: Point, p2: Point ) -> float {
let dx : float = p1.x - p2.x;
let dy : float = p1.y - p2.y;
return dx * dx + dy * dy;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment