A quantity with a unit.
This generalizes the DSSSL quantity type (to more than lengths).
add
public Numeric add(Object y,
int k)
Return this + k * obj.
- add in interface Numeric
compare
public int compare(Object obj)
Return an integer for which of {# code this} or {#code obj} is larger.
Return 1 if this>obj
; 0 if this==obj
;
-1 if this;
-2 if this!=obj
otherwise (for example if either is NaN);
-3 if not comparable (incompatible types).
- compare in interface Numeric
doubleImagValue
public double doubleImagValue()
The value of the imaginary component, as a double.
This is relative to the unit().dims - i.e. unit()/doubleValue()
is factored in.
doubleValue
public double doubleValue()
The value of the real component, as a double.
This is relative to the unit().dims - i.e. unit()/doubleValue()
is factored in.
im
public RealNum im()
The value of the imaginary component, as a RealNum.
The unit() is not factored in, so you actually need to multiply
by unit() to get the true imaginary component.
imValue
public final double imValue()
The value of the imaginary component, as a double.
This is relative to the unit().dims - i.e. unit().doubleValue()
is factored in.
A final alias for the virtual doubleImagValue.
make
public static Quantity make(double re,
double im,
Unit unit)
number
public abstract Complex number()
re
public RealNum re()
The value of the real component, as a RealNum.
The unit() is not factored in, so you actually need to multiply
by unit() to get the true real component.
reValue
public final double reValue()
The value of the real component, as a double.
This is relative to the unit().dims - i.e. unit().doubleValue()
is factored in.
A final alias for the virtual doubleValue.