Class MotionEasingUtils

java.lang.Object
icyllis.modernui.animation.MotionEasingUtils

public final class MotionEasingUtils extends Object
Utility class for animations containing motion system interpolators.
Since:
3.12
  • Field Details

  • Constructor Details

    • MotionEasingUtils

      public MotionEasingUtils()
  • Method Details

    • lerp

      public static float lerp(float startValue, float endValue, float fraction)
      Linear interpolation between startValue and endValue by fraction.
    • lerp

      public static int lerp(int startValue, int endValue, float fraction)
      Linear interpolation between startValue and endValue by fraction.
    • lerp

      public static float lerp(float outputMin, float outputMax, float inputMin, float inputMax, float value)
      Linear interpolation between outputMin and outputMax when value is between inputMin and inputMax.

      Note that value will be coerced into inputMin and inputMax.This function can handle input and output ranges that span positive and negative numbers.