Accord.IntPoint.DistanceTo C# (CSharp) Method

DistanceTo() public method

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

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