|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweiman.observableControls.LinearInterpolator
public class LinearInterpolator
Carl Weiman, August 2003 Extrapolation outside the range is permissible. Revised considerably 27-OCT-04 All outputs are double, all inputs are cast to double Let the user cast outputs to desired type
Constructor Summary | |
---|---|
LinearInterpolator(double _dblMin1,
double _dblMax1,
double _dblMin2,
double _dblMax2)
Constructor: two ranges of double values are presented. |
Method Summary | |
---|---|
double |
double1to2(double _dblInput)
Interpolate number from first range into corresponding position in second range |
double |
from1to2(double _input)
Input is cast to double in range1, interpolated to range2 |
double |
from1to2(float _input)
|
double |
from1to2(int _input)
|
double |
from1to2(short _input)
|
double |
from2to1(double _input)
Input is cast to double in range2, interpolated to range1 |
double |
from2to1(float _input)
|
double |
from2to1(int _input)
|
double |
from2to1(short _input)
|
double |
getDblMax1()
|
double |
getDblMax2()
|
double |
getDblMin1()
|
double |
getDblMin2()
|
double |
getRange1()
|
double |
getRange2()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearInterpolator(double _dblMin1, double _dblMax1, double _dblMin2, double _dblMax2)
_dblMin1
- minimum of first range_dblMax1
- maximum of first range_dblMin2
- minimum of second range_dblMax2
- maximum of second rangeMethod Detail |
---|
public double from1to2(double _input)
_input
-
public double from1to2(int _input)
public double from1to2(short _input)
public double from1to2(float _input)
public double from2to1(double _input)
_input
-
public double from2to1(int _input)
public double from2to1(short _input)
public double from2to1(float _input)
public double double1to2(double _dblInput)
_dblInput
- input from first range
public double getDblMin1()
public double getDblMax1()
public double getDblMin2()
public double getDblMax2()
public double getRange1()
public double getRange2()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |