public class Complex
extends java.lang.Object
Constructor | Description |
---|---|
Complex(double u,
double v) |
Constructs the complex number z = u + i*v
|
Modifier and Type | Method | Description |
---|---|---|
double |
arg() |
Argument of this Complex number, the angle in radians with the x-axis in polar coordinates.
|
Complex |
changeSign() |
Negative of this complex number (changeSign stands for change sign).
|
Complex |
conjugate() |
Complex conjugate of this Complex number
(the conjugate of x+i*y is x-i*y).
|
Complex |
cos() |
Cosine of this Complex number (doesn't change this Complex number).
|
Complex |
cosh() |
Hyperbolic cosine of this Complex number
(doesn't change this Complex number).
|
Complex |
div(Complex w) |
Division of Complex numbers (doesn't change this Complex number).
|
Complex |
exponential() |
Complex exponential (doesn't change this Complex number).
|
double |
imaginary() |
Imaginary part of this Complex number,the y-coordinate in rectangular coordinates.
|
Complex |
log() |
Principal branch of the Complex logarithm of this Complex number.
|
Complex |
minus(Complex w) |
Subtraction of Complex numbers (doesn't change this Complex number).
|
double |
modulus() |
Modulus of this Complex number, the distance from the origin in polar coordinates.
|
Complex |
plus(Complex w) |
Addition of Complex numbers (doesn't change this Complex number).
|
double |
real() |
Real part of this Complex number, the x-coordinate in rectangular coordinates.
|
Complex |
sin() |
Sine of this Complex number (doesn't change this Complex number).
|
Complex |
sinh() |
Hyperbolic sine of this Complex number
(doesn't change this Complex number).
|
Complex |
sqrt() |
Complex square root (doesn't change this complex number).
|
Complex |
tan() |
Tangent of this Complex number (doesn't change this Complex number).
|
Complex |
times(Complex w) |
Complex multiplication (doesn't change this Complex number).
|
java.lang.String |
toString() |
String representation of this Complex number.
|
public Complex(double u, double v)
u
- Real partv
- Imaginary partpublic double real()
public double imaginary()
public double modulus()
public double arg()
public Complex conjugate()
public Complex plus(Complex w)
w
- is the number to add.public Complex minus(Complex w)
w
- is the number to subtract.public Complex times(Complex w)
w
- is the number to multiply by.public Complex div(Complex w)
w
- is the number to divide bypublic Complex exponential()
public Complex log()
public Complex sqrt()
public Complex sin()
public Complex cos()
public Complex sinh()
public Complex cosh()
public Complex tan()
public Complex changeSign()
public java.lang.String toString()
toString
in class java.lang.Object