|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.penguinwerks.jodene.data.Scaler
com.penguinwerks.jodene.data.RangeScaler
The range scaler scales a raw value between the min an max in a range. An example would be the Farenheit scale for weather temperatures. Normally, this would be in a range from -40 to +130. A value of -40 should be 0.0. A value of 130 should be 1.0. The mid-point is 85 which translates into 0.50. The default min max values are 0.0 and 10.0.
| Constructor Summary | |
RangeScaler()
|
|
| Method Summary | |
double |
getMax()
The maximum value for the scale. |
double |
getMin()
The minimum value for the scale. |
double |
scale(double input)
Scale the input value so that input values at max are = 1.0 and input values at minumum are 0.0. |
void |
setMax(double max)
The maximum value for the scale. |
void |
setMin(double min)
The minimum value for the scale. |
| Methods inherited from class com.penguinwerks.jodene.data.Scaler |
addScaler |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RangeScaler()
| Method Detail |
public double getMax()
public void setMax(double max)
max - The max to set.public double getMin()
public void setMin(double min)
min - The min to set.public double scale(double input)
scale in class Scalerinput - The raw value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||