|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmindaslab.Math.Complex
public class Complex
Created to perform arithmetic on complex numbers
| Constructor Summary | |
|---|---|
Complex()
Creates a new instance of Complex 0 + 0 j |
|
Complex(Complex c)
Creates a new instance of Complex which has same proprties of passing Complex number |
|
Complex(double real,
double imaginary)
Creates a new instance of Complex (real + imaginary j) |
|
| Method Summary | |
|---|---|
Complex |
add(Complex c)
Adds two complex numbers |
Complex |
conjucate()
Finds the conjucate of a complex number |
Complex |
divide(Complex c)
Divides two complex numbers |
double |
getAngle()
Returns polar angle of the complex nmber |
double |
getMagnitude()
Returns the polar magnitude of the complex number |
Complex |
inverse()
Gets the inverse of complex number |
Complex |
multiply(Complex c)
Multiplies two complex numbers to give third one |
void |
setPolar(double magnitude,
double angle)
Allows one to set complex number in polar form The angle is in radians |
Complex |
subract(Complex c)
Subtacts two complex numbers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Complex()
public Complex(double real,
double imaginary)
public Complex(Complex c)
| Method Detail |
|---|
public void setPolar(double magnitude,
double angle)
public double getMagnitude()
public double getAngle()
public Complex add(Complex c)
public Complex subract(Complex c)
public Complex conjucate()
public Complex multiply(Complex c)
public Complex inverse()
public Complex divide(Complex c)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||