public interface EasingFunction
EasingFunction is a representation of mathematical easing functions useful for things like animation. A few default
implementations of easing functions are present.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EasingFunction
Function that is slower at the start and quicker at the end.static final EasingFunction
Function that is quicker at the start and slower at the end.static final EasingFunction
Function that is linear over time.static final EasingFunction
Function that is slower at the start and at the end, but quicker in the middle. -
Method Summary
-
Field Details
-
LINEAR
Function that is linear over time.x
-
EASE_IN
Function that is slower at the start and quicker at the end.x²
-
EASE_OUT
Function that is quicker at the start and slower at the end.1-(x-1)²
-
SMOOTH_STEP
Function that is slower at the start and at the end, but quicker in the middle.x²(3-2x)
-
-
Method Details
-
ease
float ease(float value) Eases a value between 0 and 1. A value of 0 should return 0. A value of 1 should return 1.- Parameters:
value
- the input value- Returns:
- the eased value
-