AForge.IntPoint.SquaredDistanceTo C# (CSharp) Méthode

SquaredDistanceTo() public méthode

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

			return dx * dx + dy * dy;
		}