|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jmlspecs.samples.dbc.ComplexOps
org.jmlspecs.samples.dbc.Rectangular
Complex numbers in rectangular coordinates.
| Field Summary | |
private double |
img
The imaginary part of this number. |
private double |
re
The real part of this number. |
| Constructor Summary | |
Rectangular()
Initialize this Complex number to be 0+(0*i). |
|
Rectangular(double re)
Initialize this Complex number to be re+(0*i). |
|
Rectangular(double re,
double img)
Initialize this Complex number to be re+(img*i). |
|
| Method Summary | |
double |
angle()
Return the angle of this complex number. |
double |
imaginaryPart()
Return the imaginary part of this complex number. |
double |
magnitude()
Return the magnitude of this complex number. |
double |
realPart()
Return the real part of this complex number. |
String |
toString()
|
| Methods inherited from class org.jmlspecs.samples.dbc.ComplexOps |
add, div, equals, hashCode, mul, sub |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private double re
private double img
| Constructor Detail |
public Rectangular()
public Rectangular(double re)
public Rectangular(double re,
double img)
| Method Detail |
public double realPart()
Complex
public double imaginaryPart()
Complex
public double magnitude()
Complex
public double angle()
Complex
public String toString()
toString in class Object
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||