template<class T> constexpr T real(const complex<T>& x);
template<class T> constexpr T imag(const complex<T>& x);
template<class T> T abs(const complex<T>& x);
Returns:
The magnitude of x.
template<class T> T arg(const complex<T>& x);
Returns:
The phase angle of x, or atan2(imag(x), real(x)).
template<class T> T norm(const complex<T>& x);
Returns:
The squared magnitude of x.
template<class T> complex<T> conj(const complex<T>& x);
Returns:
The complex conjugate of x.
template<class T> complex<T> proj(const complex<T>& x);
Returns: The projection of x onto the Riemann sphere.
Remarks:
Behaves the same as the C function cproj, defined in 7.3.9.4.
template<class T> complex<T> polar(const T& rho, const T& theta = 0);
Requires:
rho shall be non-negative and non-NaN. theta shall be finite.
Returns:
The
complex
value corresponding
to a complex number whose magnitude is rho and whose phase angle
is theta.