Beispiel #1
0
 public bool Equals(City obj)
 {
     return coordinate.Equals(obj.coordinate);
 }
Beispiel #2
0
 private double Distance(City city)
 {
     return (double)Math.Sqrt(Math.Abs((Math.Pow(coordinate.X, 2) - Math.Pow(city.X, 2)))
             + Math.Abs((Math.Pow(coordinate.Y, 2) - Math.Pow(city.Y, 2))));
 }
Beispiel #3
0
 private double Distance(City a, City b)
 {
     return Math.Sqrt(
         Math.Pow(a.X - b.X, 2) +
         Math.Pow(a.Y - b.Y, 2)
     );
 }