Interface Interpolation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interpolation methods. Some of these were converted from Flash ActionScript
implementations explained in the article
http://gizma.com/easing/.
The JavaDoc for each interpolation method includes a graphical example in ASCII art to visualize the interpolation curve.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InterpolationCubic easing interpolation.static final InterpolationDiscrete interpolation.static final InterpolationEasing interpolation.static final InterpolationLinear interpolation.static final InterpolationQuadratic easing interpolation. -
Method Summary
Modifier and TypeMethodDescriptionfloatinterpolate(float x0, float x1, float delta) Returns the interpolated value betweenx0andx1.
-
Field Details
-
DISCRETE
Discrete interpolation.. . . . . . . . x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x x x x x x x x .
-
LINEAR
Linear interpolation.. . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . .
-
EASE
Easing interpolation.. . . . . . . x x . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . x . . . . . . x x . . . . . . .
-
CUBIC
Cubic easing interpolation.. . . . . . x x x . . . . . . . . . . . . . . x . . . . . . . . . . . . . . . . . . . . . . . . . x . . . . . . . . . . . . . . . . x . . . . . x x x . . . . . .
-
QUADRATIC
Quadratic easing interpolation.. . . . . . . x x . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . . . . . . . . x x x . . . . . .
-
-
Method Details
-
interpolate
float interpolate(float x0, float x1, float delta) Returns the interpolated value betweenx0andx1. The value ofdeltais a number between 0 and 1 describing how much of the animation has been completed.
-