|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--Opus5.Complex
A complex number.
| Constructor Summary | |
Complex()
Constructs a Complex with the the value zero. |
|
Complex(double x)
Constructs a Complex with the specified real part. |
|
Complex(double x,
double y)
Constructs a Complex with the specified real
and imaginary parts. |
|
| Method Summary | |
void |
assign(Complex c)
Assigns the value of the specified complex number to this complex number. |
double |
getImag()
Returns the imaginary part of this complex number. |
double |
getR()
Returns the magnitude of this complex number. |
double |
getReal()
Returns the real part of this complex number. |
double |
getTheta()
Returns the angle of this complex number. |
void |
setImag(double y)
Sets the imaginary part of this complex number to the specified value. |
void |
setR(double r)
Sets the magnitude of this complex number to the specified value. |
void |
setReal(double x)
Sets the real part of this complex number to the specified value. |
void |
setTheta(double theta)
Sets the angle of this complex number to the specified value. |
java.lang.String |
toString()
Returns a string representation of this complex number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Complex(double x,
double y)
Complex with the specified real
and imaginary parts.x - The desired real value.y - The desired imaginary value.public Complex()
Complex with the the value zero.public Complex(double x)
Complex with the specified real part.x - The desired real value.| Method Detail |
public void setReal(double x)
x - The desired real value.public void setImag(double y)
y - The desired imaginary value.public double getReal()
public double getImag()
public double getR()
public double getTheta()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setR(double r)
r - The desired magnitude.public void setTheta(double theta)
theta - The desired angle.public void assign(Complex c)
c - The desired complex value.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||