|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.Real2
|
+--jumbo.euclid.Complex
Complex - complex number - derived from Real2
Complex represents a complex number. A reasonable number of arithmetic operations are included - DeMoivre's theorem is used for some of them so there may be quicker implementations elsewhere.
| Fields inherited from class jumbo.euclid.Real2 |
x,
y |
| Constructor Summary | |
Complex()
|
|
Complex(Complex a)
|
|
Complex(double a)
real component only |
|
Complex(double r,
Angle th)
in polar coords |
|
Complex(double a,
double b)
from components |
|
Complex(Polar p)
|
|
Complex(Real2 a)
from base class |
|
| Method Summary | |
Complex |
divideBy(Complex f)
divide a complex by a complex |
Polar |
getPolar()
|
double |
getR()
get as polar coords |
double |
getReal()
gets real part |
Angle |
getTheta()
|
Complex |
multiply(Complex f)
multiply a complex by a complex |
void |
negative()
unary minus MODIFIES object |
static Complex |
sqrt(Complex a)
complex square root |
java.lang.String |
toString()
|
| Methods inherited from class jumbo.euclid.Real2 |
addPolygonOnLine,
clear,
dotProduct,
elementAt,
equals,
getAngle,
getAngle,
getLength,
getMidPoint,
getUnitVector,
getX,
getY,
makePoint,
multiplyBy,
plus,
setX,
setY,
sortAscending,
sortDescending,
subtract,
swap,
transformBy |
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Complex()
public Complex(double a)
public Complex(double a,
double b)
public Complex(Real2 a)
public Complex(double r,
Angle th)
public Complex(Polar p)
public Complex(Complex a)
| Method Detail |
public double getReal()
public void negative()
public Complex multiply(Complex f)
public Complex divideBy(Complex f)
throws java.lang.ArithmeticException
public double getR()
public Angle getTheta()
public Polar getPolar()
public static Complex sqrt(Complex a)
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||