JavaScript API Reference#
complex#
new dime.Complex(real, imaginary)
Creates a new DiME Complex object.
Parameters |
||
|---|---|---|
Name |
Type |
Description |
real |
number |
The real number part of the complex number. |
imaginary |
number |
The imaginary part of the complex number. |
Returns |
|
|---|---|
Type |
Description |
Complex |
The newly created Complex object. |
add#
Complex.add(rhs)
Adds two Complex objects.
Parameters |
||
|---|---|---|
Name |
Type |
Description |
rhs |
Complex |
The Complex object on the right hand side of the equation. |
Returns |
|
|---|---|
Type |
Description |
Complex |
The sum of the two Complex objects. |
sub#
Complex.sub(rhs)
Subtracts two Complex objects.
Parameters |
||
|---|---|---|
Name |
Type |
Description |
rhs |
Complex |
The Complex object on the right hand side of the equation (the subtractor). |
Returns |
|
|---|---|
Type |
Description |
Complex |
The difference of the two Complex objects. |
mul#
Complex.mul(rhs)
Multiplies two Complex objects.
Parameters |
||
|---|---|---|
Name |
Type |
Description |
rhs |
Complex |
The Complex object on the right hand side of the equation. |
Returns |
|
|---|---|
Type |
Description |
Complex |
The product of the two Complex objects. |
div#
Complex.div(rhs)
Divides two Complex objects.
Parameters |
||
|---|---|---|
Name |
Type |
Description |
rhs |
Complex |
The Complex object on the right hand side of the equation (the divisor). |
Returns |
|
|---|---|
Type |
Description |
Complex |
The product of the two Complex objects. |