Accord.DoublePoint.DistanceTo C# (CSharp) Method

DistanceTo() public method

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

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