AForge.IntPoint.EuclideanNorm C# (CSharp) Method

EuclideanNorm() public method

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

Usage Example

Exemplo n.º 1
0
        public void EuclideanNormTest( int x, int y, double expectedNorm )
        {
            IntPoint point = new IntPoint( x, y );

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