コード例 #1
0
ファイル: XYPoint.cs プロジェクト: Brondahl/MDMUtils
 public static double DirectDistanceBetween(XYPoint first, XYPoint second)
 {
     return(first.DirectDistanceFrom(second));
 }
コード例 #2
0
ファイル: XYPoint.cs プロジェクト: Brondahl/MDMUtils
 public int DistanceFrom(XYPoint other)
 {
     return(Math.Abs(X - other.X) + Math.Abs(Y - other.Y));
 }
コード例 #3
0
ファイル: XYPoint.cs プロジェクト: Brondahl/MDMUtils
 public double DirectDistanceFrom(XYPoint other)
 {
     return(Math.Sqrt(Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2)));
 }
コード例 #4
0
ファイル: XYPoint.cs プロジェクト: Brondahl/MDMUtils
 public virtual bool Equals(XYPoint other)
 {
     return(base.Equals(other));
 }