arg
-
constexpr double arg(const Complex &z) noexcept
Returns the magnitude [1] of a complex number \(z\).
Parameters
- const Complex &z
A complex number.
Returns
- type Complex
A complex number.
The arg, or argument of a complex number, is defined as follows:
\[\DeclareMathOperator\arg{arg}
\DeclareMathOperator{\atantwo}{atan2}
\arg(z) = \atantwo ( y, x)\]
Example
Complex z = 3 + 4_j;
std::cout << arg(z) << "\n";
Output:
0.927295
References