예제 #1
0
 public static double DirectDistanceBetween(XYPoint first, XYPoint second)
 {
     return(first.DirectDistanceFrom(second));
 }
예제 #2
0
 public int DistanceFrom(XYPoint other)
 {
     return(Math.Abs(X - other.X) + Math.Abs(Y - other.Y));
 }
예제 #3
0
 public double DirectDistanceFrom(XYPoint other)
 {
     return(Math.Sqrt(Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2)));
 }
예제 #4
0
 public virtual bool Equals(XYPoint other)
 {
     return(base.Equals(other));
 }