Interface EasingFunction


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

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Modifier and Type
    Method
    Description
    float
    ease(float value)
    Eases a value between 0 and 1.
  • Field Details

    • LINEAR

      static final EasingFunction LINEAR
      Function that is linear over time.
         x
       
    • EASE_IN

      static final EasingFunction EASE_IN
      Function that is slower at the start and quicker at the end.
    • EASE_OUT

      static final EasingFunction EASE_OUT
      Function that is quicker at the start and slower at the end.
         1-(x-1)²
       
    • SMOOTH_STEP

      static final EasingFunction 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