Enum Class TweenFunction

java.lang.Object
java.lang.Enum<TweenFunction>
pi.animation.tweening.TweenFunction
All Implemented Interfaces:
Serializable, Comparable<TweenFunction>, Constable

public enum TweenFunction extends Enum<TweenFunction>
Easing equations based on Robert Penner's work: http://robertpenner.com/easing/
  • Enum Constant Details

  • Method Details

    • values

      public static TweenFunction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TweenFunction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getEquation

      public TweenEquation getEquation()
      Gets the mathematical equation.
      Returns:
      the equation
    • compute

      public float compute(float time)
      Computes the next value of the interpolation.
      Parameters:
      time - The current progress of the tween duration, between 0 and 1.
      Returns:
      The next interpolated value.