Beispiel #1
0
 public int GetDistanceTo(StaticPoint anotherPoint)
 {
     return((int)Math.Sqrt(Math.Pow(anotherPoint.X - X, 2.0) + Math.Pow(anotherPoint.Y - Y, 2.0)));
 }
Beispiel #2
0
 public int GetSquareOfDistanceTo(StaticPoint anotherPoint)
 {
     return((int)(Math.Pow(anotherPoint.X - X, 2.0) + Math.Pow(anotherPoint.Y - Y, 2.0)));
 }