functionarg

Phase angle of complex number

Information

Syntax

   Complex.arg(c);
   Complex.arg(c, phi0=0);

Description

The function call "Complex.arg(c)" returns the phase angle phi of the Complex number c in the range -pi < phi < pi.
The function call "Complex.arg(c,phi0)" returns the phase angle phi of the Complex number c in the range -pi < phi - phi0 < pi.

Example

  Complex.arg( Complex(1,0.5), 4*pi );  // = 4*pi+pi/4 = 13.351...

Inputs

TypeNameDefaultDescription
ComplexcComplex number
Modelica.Units.SI.Anglephi00phase angle phi shall be in the range: -pi < phi-phi0 < pi

Outputs

TypeNameDefaultDescription
Modelica.Units.SI.Anglephi= phase angle of c