Namespaces
Variants
Views
Actions

std::abs(std::complex)

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 19:49, 8 June 2014 by Diego91b (Talk | contribs)

Defined in header <complex>
template< class T >
T abs( const complex<T>& z );

Returns the magnitude of the complex number z.

Parameters

z - complex value

Return value

the magnitude of z

See also

returns the phase angle
(function template) [edit]
constructs a complex number from magnitude and phase angle
(function template) [edit]
computes absolute value of an integral value (|x|)
(function) [edit]
absolute value of a floating point value (|x|)
(function) [edit]
(C++11)
computes square root of the sum of the squares of two given numbers (x2
+y2
)
(function) [edit]
applies the function std::abs to each element of valarray
(function template) [edit]