kao.math.Complex Class Reference
A Complex number implementation.
More...
List of all members.
Detailed Description
A Complex number implementation.
A Complex number as defined by:
- Author:
- David Kao
Constructor & Destructor Documentation
kao.math.Complex.Complex |
( |
double |
re, |
|
|
double |
im | |
|
) |
| | |
Create a new Complex number.
- Parameters:
-
- Author:
- David Kao
Member Function Documentation
Complex number addition.
Add Complex number x to this Complex number.
- Parameters:
-
- Returns:
- Result of Complex number addition.
- Author:
- David Kao
double kao.math.Complex.complexConj |
( |
|
) |
|
Calculate the complex conjugate of this Complex number.
- Returns:
- Complex conjugate.
- Author:
- David Kao
Calculates the conjugate of this Complex number.
- Returns:
- The conjugate of this Complex number.
- Author:
- David Kao
Complex kao.math.Complex.div |
( |
double |
r |
) |
|
Complex number division.
Divides this Complex number with a real number r.
- Parameters:
-
- Returns:
- Result of Complex number/Real number division.
- Author:
- David Kao
Complex number division.
Divides this Complex number with x.
- Parameters:
-
- Returns:
- Result of Complex number division.
- Author:
- David Kao
Calculates the exponential of this Complex number.
- Returns:
- The exponential of this Complex number.
- Author:
- David Kao
double kao.math.Complex.getIm |
( |
|
) |
|
Return the imaginary part of this Complex number.
- Returns:
- Imaginary part of this Complex number
- Author:
- David Kao
double kao.math.Complex.getRe |
( |
|
) |
|
Return the real part of this Complex number.
- Returns:
- Real part of this Complex number
- Author:
- David Kao
double kao.math.Complex.modulus |
( |
|
) |
|
Calculate the modulus of this Complex number.
- Returns:
- Modulus
- Author:
- David Kao
Complex kao.math.Complex.mult |
( |
double |
r |
) |
|
Complex number multiplication.
Multiplies this Complex number with a real number r.
- Parameters:
-
- Returns:
- Result of Complex number/Real number multiplication.
- Author:
- David Kao
Complex number multiplication.
Multiplies this Complex number with x.
- Parameters:
-
- Returns:
- Result of Complex number multiplication.
- Author:
- David Kao
Complex kao.math.Complex.pow |
( |
int |
n |
) |
|
Calculates the this Complex number to the power of n.
- Parameters:
-
- Returns:
- This Complex number to the power of n.
- Author:
- David Kao
Complex kao.math.Complex.pow |
( |
double |
n |
) |
|
Calculates the this Complex number to the power of n.
- Parameters:
-
- Returns:
- This Complex number to the power of n.
- Author:
- David Kao
void kao.math.Complex.setIm |
( |
double |
im |
) |
|
Set the imaginary part of this Complex number.
- Parameters:
-
| im | Imaginary part of Complex number |
- Author:
- David Kao
void kao.math.Complex.setRe |
( |
double |
re |
) |
|
Set the real part of this Complex number.
- Parameters:
-
- Author:
- David Kao
Complex number subtraction.
Subtracts Complex number x from this Complex number.
- Parameters:
-
- Returns:
- Result of Complex number subtraction.
- Author:
- David Kao