|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.datatypes.Scaler
public class Scaler
Defines a scaler, which is a non-negative scaling coefficient representing a percentage. For example, a scaler of 0.5 applied to a box would decrease its width and height by half.
| Field Summary | |
|---|---|
private double |
_value
the non-negative scale |
static Scaler |
HALF
|
static Scaler |
QUARTER
zzz |
static Scaler |
THREE_QUARTER
|
| Constructor Summary | |
|---|---|
Scaler(double value)
Creates a scaler. |
|
| Method Summary | |
|---|---|
Scaler |
add_(Scaler value)
Adds another unit to this one. |
int |
compareTo(Scaler value)
|
double |
getValue_()
Returns the numerical value of this unit. |
double |
remapToNegativePositive()
Remaps a scaler on the interval [0,1] to [-1.+1]. |
Scaler |
rescale(Scaler scaler)
Rescales this scaler according to another one. |
private void |
setScaler(double value)
Sets the scale. |
Scaler |
subtract_(Scaler value)
Subtract another unit from this one. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private double _value
public static final Scaler HALF
public static final Scaler QUARTER
public static final Scaler THREE_QUARTER
| Constructor Detail |
|---|
public Scaler(double value)
value - - the non-negative scale| Method Detail |
|---|
public Scaler add_(Scaler value)
add_ in interface I_Unitable<Scaler>value - - the unit
public int compareTo(Scaler value)
compareTo in interface java.lang.Comparable<Scaler>public double getValue_()
getValue_ in interface I_Unitable<Scaler>public double remapToNegativePositive()
public Scaler rescale(Scaler scaler)
scaler - - the other scaler
private void setScaler(double value)
value - - the non-negative scalepublic Scaler subtract_(Scaler value)
subtract_ in interface I_Unitable<Scaler>value - - the unit
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||