< cpp‎ | numeric‎ | complex
Revision as of 16:41, 1 July 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Defined in header <complex>
template< class T >
T norm( const complex<T>& z );
long double norm( long double z );
(2) (since C++11)
template< class DoubleOrIngeter >
double norm( DoubleOrInteger z );
(3) (since C++11)
float norm( float z );
(4) (since C++11)

Returns the squared magnitude of the complex number z.

(since C++11)Additional overloads are provided for float, double, long double, and all integer types, which are treated as complex numbers with zero imaginary component.

[edit] Parameters

z - complex value

[edit] Return value

the squared magnitude of z

[edit] See also

returns the magnitude of a complex number
(function template) [edit]
returns the complex conjugate
(function template) [edit]
constructs a complex number from magnitude and phase angle
(function template) [edit]