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

SquaredDistanceTo() 공개 메소드

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

            return dx * dx + dy * dy;
        }