Accord.Point.SquaredDistanceTo C# (CSharp) Method

SquaredDistanceTo() public method

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

            return dx * dx + dy * dy;
        }