public final class MatlabSingle extends Object
single with real and imaginary components.| Constructor and Description |
|---|
MatlabSingle(float real,
float imag) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Returns
true if and only if the other object is of the same class and its component real and imaginary
parts are both equal. |
int |
hashCode()
Returns a hash code compatible with
equals(...). |
boolean |
isReal()
Returns
true if the imaginary value is equivalent to the default value for the numeric type,
false otherwise. |
float |
toImaginary()
Returns the imaginary value.
|
float |
toReal()
Returns the real value.
|
String |
toString()
Returns a
String representation of the number. |
public float toReal()
public float toImaginary()
public boolean isReal()
true if the imaginary value is equivalent to the default value for the numeric type,
false otherwise. Equivalent to the MATLAB isreal function.public String toString()
String representation of the number. If the number is real the String representation is
real. If an imaginary component is present, the format is real + imagi if the
imaginary component is non-negative and real - imagi if the imaginary component is
negative.public boolean equals(Object obj)
true if and only if the other object is of the same class and its component real and imaginary
parts are both equal. The definition of equality for the component parts is defined by the equals(...)
method of the boxed numeric class of its components.