public static class AbstractComplexArray.Complex extends Number implements Comparable<AbstractComplexArray.Complex>
Modifier and Type | Field and Description |
---|---|
double |
im
The imaginary part.
|
double |
re
The real part.
|
Constructor and Description |
---|
AbstractComplexArray.Complex(double re,
double im)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Gets the
byte value. |
int |
compareTo(AbstractComplexArray.Complex b)
Does a comparison on the basis of magnitude.
|
double |
doubleValue()
Gets the
double value. |
boolean |
equals(Object o)
Fulfills the
equals(Object) contract. |
float |
floatValue()
Gets the
float value. |
int |
hashCode()
Fulfills the
hashCode() contract. |
int |
intValue()
Gets the
int value. |
long |
longValue()
Gets the
long value. |
double |
magnitude()
Calculates the complex magnitude.
|
String |
toString()
Creates a human-readable representation of this number.
|
shortValue
public AbstractComplexArray.Complex(double re, double im)
re
- the real part.im
- the imaginary part.public double magnitude()
public boolean equals(Object o)
equals(Object)
contract.public int hashCode()
hashCode()
contract.public int compareTo(AbstractComplexArray.Complex b)
compareTo
in interface Comparable<AbstractComplexArray.Complex>
public double doubleValue()
double
value.doubleValue
in class Number
public float floatValue()
float
value.floatValue
in class Number