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

EuclideanNorm() public méthode

Calculate Euclidean norm of the vector comprised of the point's coordinates - distance from (0, 0) in other words.
public EuclideanNorm ( ) : float
Résultat float
		public float EuclideanNorm( )
		{
			return (float) System.Math.Sqrt( X * X + Y * Y );
		}
	}    

Usage Example

Exemple #1
0
        public void EuclideanNormTest( int x, int y, double expectedNorm )
        {
            IntPoint point = new IntPoint( x, y );

            Assert.AreEqual( point.EuclideanNorm( ), expectedNorm );
        }