
JML  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
Complex numbers. Note that these are immutable. Abstractly, one can think of a complex number as realPart+(imaginaryPart*i). Alternatively, one can think of it as distance from the origin along a given angle (measured in radians counterclockwise from the positive x axis), hence a pair of (magnitude, angle). This class supports both of these views. The specifications in this class are intentionally of the lightweight variety.
Method Summary  
Complex 
add(Complex b)
Return this + b (the sum of this and b). 
double 
angle()
Return the angle of this complex number. 
Complex 
div(Complex b)
Return this/b (the quotient of this by b). 
boolean 
equals(Object o)
Return true if these are the same complex number. 
int 
hashCode()
Return a hashCode for this number. 
double 
imaginaryPart()
Return the imaginary part of this complex number. 
double 
magnitude()
Return the magnitude of this complex number. 
Complex 
mul(Complex b)
Tell whether the given angles are the same, taking into account that angles measured in radians wrap around after 2*StrictMath.PI times. 
double 
realPart()
Return the real part of this complex number. 
Complex 
sub(Complex b)
Return this  b (the difference between this and b). 
Method Detail 
public double realPart()
public double imaginaryPart()
public double magnitude()
public double angle()
public Complex add(Complex b)
public Complex sub(Complex b)
public Complex mul(Complex b)
public Complex div(Complex b)
public boolean equals(Object o)
public int hashCode()

JML  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 