|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xinapse.multisliceimage.Complex
public final class Complex
A complex (real, imaginary) number.
| Constructor Summary | |
|---|---|
Complex()
Creates a new Complex number, with zero real and imaginary parts. |
|
Complex(float r,
float i)
Creates a new Complex number, with the real and imaginary part specified by the arguments. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Determines whether another object is equal to this Complex number. |
float |
getArg()
Returns the polar angle of this Complex number. |
float |
getImag()
Returns the imaginary part of this Complex number. |
float |
getMod()
Returns the modulus of this Complex number. |
float |
getReal()
Returns the real part of this Complex number. |
int |
hashCode()
Returns a hash code value for this Complex number. |
void |
polar(float mod,
float arg)
Set real and imaginary components of this Complex given the modulus and argument (in radians). |
void |
set(float r,
float i)
Sets the real and imaginary parts of this Complex number. |
void |
setImag(float i)
Sets the imaginary part of this Complex number. |
void |
setReal(float r)
Sets the real part of this Complex number. |
java.lang.String |
toString()
Returns a string representation of this Complex number. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Complex()
public Complex(float r,
float i)
r - the real part of the complex number.i - the imaginary part of the complex number.| Method Detail |
|---|
public void set(float r,
float i)
r - the new real part of the complex number.i - the new imaginary part of the complex number.public void setReal(float r)
r - the new real part of the complex number.public void setImag(float i)
i - the new imaginary part of the complex number.
public void polar(float mod,
float arg)
mod - the modulus.arg - the argument in radians.public float getReal()
public float getImag()
public float getArg()
public float getMod()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to compare with.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||