Defined in header
<complex> | ||
---|---|---|
template< class T > complex<T> polar( const T& r, const T& theta = 0 ); |
Returns a complex number with magnitude r
and phase angle theta
.
The behavior is undefined if r is negative or NaN, or if theta is infinite | (since C++17) |
r | - | magnitude |
theta | - | phase angle |
a complex number determined by r
and theta
.
returns the magnitude of a complex number (function template) |
|
returns the phase angle (function template) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/complex/polar