Skip to content

Instantly share code, notes, and snippets.

@Bizunow
Last active August 24, 2017 07:25
Show Gist options
  • Save Bizunow/67a6ed797c95427da528ea4de6afdc71 to your computer and use it in GitHub Desktop.
Save Bizunow/67a6ed797c95427da528ea4de6afdc71 to your computer and use it in GitHub Desktop.
[Point distance] Get distance between tow points #csharp #gamedev
public double getPointDistance(int x1, int y1, int x2, int y2)
{
return Math.Pow(x1 - x2, 2) + Math.Pow(y1 - y2, 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment