Node:Arg, Next:, Previous:ArcTan, Up:Reference



Arg

Synopsis


function Arg (z: Complex): Real;

Description

Arg returns the complex "argument", i.e. the angle (in radian) in the complex plane with respect to the real axis, of its parameter z. The result is in the range of -Pi < Arg (z) <= Pi.

Conforming to

Arg is an ISO 10206 Extended Pascal extension.

Example


program ArgDemo;
var
  z: Complex;
begin
  z := Cmplx (1, 1);  { 1 + i }
  WriteLn (Arg (z) : 0 : 5)  { yields 0.78540, i.e. Pi / 4 }
end.

See also

ArcTan, Ln, Polar.