Class JXG.Complex
↳ JXG.Complex
This class is for calculating with complex numbers.
Defined in: Complex.js.
Constructor Attributes | Constructor Name and Description |
---|---|
JXG.Complex(x, y)
Creates a new complex number.
|
Field Attributes | Field Name and Description |
---|---|
Absolute value in the polar form of the complex number.
|
|
Angle value in the polar form of the complex number.
|
|
Imaginary part of the complex number.
|
|
<private> |
This property is only to signalize that this object is of type JXG.Complex.
|
Real part of the complex number.
|
Method Attributes | Method Name and Description |
---|---|
add(c)
Add another complex number to this complex number.
|
|
conj(c)
Conjugate a complex number in place.
|
|
div(c)
Divide this complex number by the given complex number.
|
|
mult(c)
Multiply another complex number to this complex number.
|
|
sub(c)
Subtract another complex number from this complex number.
|
|
toString()
Converts a complex number into a string.
|
Class Detail
JXG.Complex(x, y)
Creates a new complex number.
- Parameters:
- {number} x Optional, Default: 0
- Real part of the resulting complex number.
- {number} y Optional, Default: 0
- Imaginary part of the resulting complex number.
- Returns:
- An object representing the complex number x + iy.
Field Detail
{number}
absval
Absolute value in the polar form of the complex number. Currently unused.
{number}
angle
Angle value in the polar form of the complex number. Currently unused.
{number}
imaginary
Imaginary part of the complex number.
- Default Value:
- 0
<private>
{boolean}
isComplex
This property is only to signalize that this object is of type JXG.Complex. Only
used internally to distinguish between normal JavaScript numbers and JXG.Complex numbers.
- Default Value:
- true
{number}
real
Real part of the complex number.
- Default Value:
- 0
Method Detail
{undefined}
add(c)
Add another complex number to this complex number.
- Parameters:
- {JXG.Complex|number} c
- A JavaScript number or a JXG.Complex object to be added to the current object.
{undefined}
conj(c)
Conjugate a complex number in place.
- Parameters:
- c
- A JavaScript number or a JXG.Complex object
{undefined}
div(c)
Divide this complex number by the given complex number.
- Parameters:
- {JXG.Complex|number} c
- A JavaScript number or a JXG.Complex object to divide the current object by.
{undefined}
mult(c)
Multiply another complex number to this complex number.
- Parameters:
- {JXG.Complex|number} c
- A JavaScript number or a JXG.Complex object to multiply with the current object.
{undefined}
sub(c)
Subtract another complex number from this complex number.
- Parameters:
- {JXG.Complex|number} c
- A JavaScript number or a JXG.Complex object to subtract from the current object.
{string}
toString()
Converts a complex number into a string.
- Returns:
- Formatted string containing the complex number in human readable form (algebraic form).