Accord.Point.DistanceTo C# (CSharp) Method

DistanceTo() public method

Calculate Euclidean distance between two points.
public DistanceTo ( Point anotherPoint ) : float
anotherPoint Point Point to calculate distance to.
return 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);
        }