Accord.Point.DistanceTo C# (CSharp) 메소드

DistanceTo() 공개 메소드

Calculate Euclidean distance between two points.
public DistanceTo ( Point anotherPoint ) : float
anotherPoint Point Point to calculate distance to.
리턴 float
        public float DistanceTo(Point anotherPoint)
        {
            float dx = X - anotherPoint.X;
            float dy = Y - anotherPoint.Y;

            return (float)System.Math.Sqrt(dx * dx + dy * dy);
        }