Members
Own
imaginary : Number
- Description
Imaginary part of the complex number.
- Type
- Number
- Default Value
- 0
- Source
- math/complex.js, line 82
(private) isComplex : Boolean
- Description
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.
- Type
- Boolean
- Default Value
- true
- Source
- math/complex.js, line 61
real : Number
- Description
Real part of the complex number.
- Type
- Number
- Default Value
- 0
- Source
- math/complex.js, line 75
Inherited
none
Methods
Own
abs()
Absolute value in the polar form, i.e. |z| of the complex number z.
Returns
Number
Details
- Source
- math/complex.js, line 239
add(c) → {JXG.Complex}
Add another complex number to this complex number.
Parameters
| Name | Type | Description |
|---|---|---|
c |
JXG.Complex | Number | A JavaScript number or a JXG.Complex object to be added to the current object. |
Returns
Reference to this complex number
- Type
- JXG.Complex
Details
- Source
- math/complex.js, line 128
angle()
Angle value in the polar form of the complex number (in radians).
Returns
Number
Details
- Source
- math/complex.js, line 249
conj() → {JXG.Complex}
Conjugate a complex number in place.
Returns
Reference to this complex number
- Type
- JXG.Complex
Details
- Source
- math/complex.js, line 229
div(c) → {JXG.Complex}
Divide this complex number by the given complex number.
Parameters
| Name | Type | Description |
|---|---|---|
c |
JXG.Complex | Number | A JavaScript number or a JXG.Complex object to divide the current object by. |
Returns
Reference to this complex number
- Type
- JXG.Complex
Details
- Source
- math/complex.js, line 189
mult(c) → {JXG.Complex}
Multiply another complex number to this complex number.
Parameters
| Name | Type | Description |
|---|---|---|
c |
JXG.Complex | Number | A JavaScript number or a JXG.Complex object to multiply with the current object. |
Returns
Reference to this complex number
- Type
- JXG.Complex
Details
- Source
- math/complex.js, line 161
sub(c) → {JXG.Complex}
Subtract another complex number from this complex number.
Parameters
| Name | Type | Description |
|---|---|---|
c |
JXG.Complex | Number | A JavaScript number or a JXG.Complex object to subtract from the current object. |
Returns
Reference to this complex number
- Type
- JXG.Complex
Details
- Source
- math/complex.js, line 144
toArray()
Return real and imaginary parts of a complex number as array of length 2.
Returns
[complex.real,complex.imaginary];
Details
- Source
- math/complex.js, line 119
toString(digitsopt) → {String}
Converts a complex number into a string.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
digits |
Number |
<optional> |
null
|
number of digits if not null |
Returns
Formatted string containing the complex number in human readable form (algebraic form).
- Type
- String
Details
- Source
- math/complex.js, line 105
Inherited
none
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
x |
Number |
<optional> |
0
|
Real part. |
y |
Number |
<optional> |
0
|
Imaginary part. |
Details
- See
- Source
- math/complex.js, line 53