AForge.DoublePoint.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 ( ) : double
return double
        public double EuclideanNorm( )
        {
            return System.Math.Sqrt( X * X + Y * Y );
        }
    }

Usage Example

Esempio n. 1
0
        public void EuclideanNormTest( double x, double y, double expectedNorm )
        {
            DoublePoint point = new DoublePoint( x, y );

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