2.2.3.3.4 complex::GetPhase

Description

returns the phase in radians, of the complex value.

Syntax

double GetPhase( )

Parameters

Return

The phase

Examples

EX1

void    complex_GetPhase()
{
    complex        cc(1., -1.);
    
    // Display the phase:
    out_double("phase = ", cc.GetPhase());    // shoulde be -0.7854 (=-PI/4)
}

Remark

See Also

Complex::GetAmplitude

Header to Include

origin.h