API / geotoolkit / seismic / analysis / maths / ComplexNumber / ComplexNumber
maths.ComplexNumber.ComplexNumber
A complex number, C, has the form C = A + B*j, where A and B are both real. We refer to A as the 'real part' of C, and B as the 'imaginary part' of C where both A and B can be represented by double precision values. Ported from the Saddleback Geosolution's Java implementation
Constructors
| [new ComplexNumber(num)](/solutions/geotoolkit/apis/classes/geotoolkit.seismic.analysis.maths.complexnumber.complexnumber.md#new complexnumber(num)) | [new ComplexNumber(real, imag)](/solutions/geotoolkit/apis/classes/geotoolkit.seismic.analysis.maths.complexnumber.complexnumber.md#new complexnumber(real, imag)) |
|---|
Constructors
• new ComplexNumber(num)
| Name | Type |
|---|---|
num | ComplexNumber |
• new ComplexNumber(real, imag)
| Name | Type | Description |
|---|---|---|
real | number | Real part of the complex value denoted by A in the expression C = A + B*j |
imag | number | The imaginary component Imaginary part of the complex value denoted by B in the expression C = A + B*j |
Methods
▸ getClassName(): string
string
▸ getImag(): number
Gets the imaginary value of the complex number.
number
imag The imaginary component.
▸ getReal(): number
Gets the real value of the complex number.
number
real The real component.
▸ setImag(imag): ComplexNumber
Sets the imaginary value of the complex number.
| Name | Type | Description |
|---|---|---|
imag | number | The imaginary component. |
this
▸ setReal(real): ComplexNumber
Sets the real value of the complex number.
| Name | Type | Description |
|---|---|---|
real | number | The real component |
this
▸ toString(): string
Gets the string representation of this complex number.
string
stringValue The string value of the complex number.
▸ Static getClassName(): string
string