The cmath.phase()
function returns the phase of a complex number which is the angle between the real axis and the vector representing the number.
The return value is in radians and is between -π
and π
, inclusive.
cmath.phase(x)
copy
x |
The value(real or complex) whose phase is to be determined. If the value is a real number, it is first converted into a complex value before the operation. |
This function returns a float representing the phase of the complex number, x
, in radians.