Last active
August 24, 2017 07:25
-
-
Save Bizunow/67a6ed797c95427da528ea4de6afdc71 to your computer and use it in GitHub Desktop.
[Point distance] Get distance between tow points #csharp #gamedev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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