complex::GetAmplitude

Description

returns the amplitude(modulus) of the complex value.

Syntax

double GetAmplitude( )

Parameters

Return

The amplitude

Examples

EX1

void    complex_GetAmplitude()
{
    complex        cc(1., -1.);
    
    // Display the amplitude:
    out_double("amplitude = ", cc.GetAmplitude());    // shoulde be 1.41421 (=sqrt(2))
}

Remark

See Also

Complex::GetPhase

header to Include

origin.h