OpenWareLaboratory
ComplexFloat Struct Reference

A structure defining a floating point complex number as two members of type float. More...

Public Member Functions

float getMagnitude ()
 Get the magnitude of the complex number. More...
 
float getPhase ()
 Get the phase of the complex number. More...
 
void setMagnitude (float magnitude)
 Set the magnitude of the complex number. More...
 
void setPhase (float phase)
 Set the phase of the complex number. More...
 
void setPolar (float magnitude, float phase)
 Set magnitude and phase of the complex number. More...
 

Data Fields

float im
 The imaginary part of the complex number. More...
 
float re
 The real part of the complex number. More...
 

Detailed Description

A structure defining a floating point complex number as two members of type float.

Definition at line 9 of file ComplexFloatArray.h.

Member Function Documentation

float ComplexFloat::getMagnitude ( )
inline

Get the magnitude of the complex number.

Computes and returns the magnitude of the complex number.

Returns
The magnitude of the complex number.

Definition at line 25 of file ComplexFloatArray.h.

References im, and re.

Referenced by ComplexFloatArray::getPolar(), and setPhase().

float ComplexFloat::getPhase ( )
inline

Get the phase of the complex number.

Computes and returns the phase of the complex number.

Returns
The phase of the complex number.

Definition at line 34 of file ComplexFloatArray.h.

References im, and re.

Referenced by ComplexFloatArray::getPolar(), and setMagnitude().

void ComplexFloat::setMagnitude ( float  magnitude)
inline

Set the magnitude of the complex number.

Set the magnitude of the complex number, keeping the phase unaltered.

Parameters
magnitudeThe new magnitude of the complex number

Definition at line 53 of file ComplexFloatArray.h.

References getPhase(), and setPolar().

void ComplexFloat::setPhase ( float  phase)
inline

Set the phase of the complex number.

Set the phase of the complex number, keeping the magnitude unaltered.

Parameters
phaseThe new phase of the complex number

Definition at line 43 of file ComplexFloatArray.h.

References getMagnitude(), and setPolar().

Referenced by ComplexFloatArray::setPhase().

void ComplexFloat::setPolar ( float  magnitude,
float  phase 
)
inline

Set magnitude and phase of the complex number.

Parameters
magnitudeThe new magnitude of the complex number
phaseThe new phase of the complex number

Definition at line 64 of file ComplexFloatArray.h.

References im, and re.

Referenced by setMagnitude(), ComplexFloatArray::setMagnitude(), setPhase(), ComplexFloatArray::setPhase(), and ComplexFloatArray::setPolar().

Field Documentation


The documentation for this struct was generated from the following file: