interpolate
public float interpolate(float initialValue,
float currentValue,
float alpha)
The interpolation algorithm. This takes the initial value, the current value, and the ratio of initial value to current value. The result is then returned for use.
- Specified by:
interpolate
in interface FloatInterpolator
- Parameters:
initialValue
- the initial value
currentValue
- the current value
alpha
- a value between 0.0f to 1.0f. When alpha is 0.0f, the value should always be the initial value. When alpha is at 1.0f, the value should always be the current value.