Class pmr.euclid.Complex
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.euclid.Complex
java.lang.Object
|
+----pmr.euclid.Status
|
+----pmr.euclid.Real2
|
+----pmr.euclid.Complex
- public class Complex
- extends Real2
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.
- Author:
- (C) P. Murray-Rust, 1996
-
Complex()
-
-
Complex(Complex)
-
-
Complex(double)
- real component only
-
Complex(double, Angle)
- in polar coords
-
Complex(double, double)
- from components
-
Complex(Polar)
-
-
Complex(Real2)
- from base class
-
divideBy(Complex)
- divide a complex by a complex
-
getPolar()
-
-
getR()
- get as polar coords
-
getReal()
- gets real part
-
getTheta()
-
-
multiply(Complex)
- multiply a complex by a complex
-
negative()
- unary minus MODIFIES object
-
sqrt(Complex)
- complex square root
-
toString()
-
Complex
public Complex()
Complex
public Complex(double a)
- real component only
Complex
public Complex(double a,
double b)
- from components
Complex
public Complex(Real2 a)
- from base class
Complex
public Complex(double r,
Angle th)
- in polar coords
Complex
public Complex(Polar p)
Complex
public Complex(Complex a)
getReal
public double getReal()
- gets real part
negative
public void negative()
- unary minus MODIFIES object
- Overrides:
- negative in class Real2
multiply
public Complex multiply(Complex f)
- multiply a complex by a complex
divideBy
public Complex divideBy(Complex f) throws ArithmeticException
- divide a complex by a complex
getR
public double getR()
- get as polar coords
getTheta
public Angle getTheta()
getPolar
public Polar getPolar()
sqrt
public static Complex sqrt(Complex a)
- complex square root
toString
public String toString()
- Overrides:
- toString in class Real2
All Packages Class Hierarchy This Package Previous Next Index