Namespaces
Variants
Views
Actions

std::arg(std::complex)

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 21:06, 23 April 2013 by Dieram3 (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <complex>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
template< class T >
T arg( const complex<T>& z );
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
long double arg( long double z );
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
template< class DoubleOrIngeter >
double arg( DoubleOrInteger z );
</td>

<td > (3) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
float arg( float z );
</td>

<td > (4) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Returns the phase angle of the complex number z, i.e. atan2(std::imag(z), std::real(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.

Parameters

z - complex value

Return value

the phase angle of z

See also

Template:cpp/numeric/complex/dcl list normTemplate:cpp/numeric/complex/dcl list conjTemplate:cpp/numeric/complex/dcl list polar