Class StepEasing

java.lang.Object
dev.prozilla.pine.common.math.easing.StepEasing
All Implemented Interfaces:
EasingFunction

public class StepEasing extends Object implements EasingFunction
An easing function that jumps between steps with an equal length instead of transitioning smoothly.
  • Field Details

    • steps

      protected final int steps
    • jumpAtStart

      protected final boolean jumpAtStart
  • Constructor Details

    • StepEasing

      public StepEasing(int steps)
    • StepEasing

      public StepEasing(int steps, boolean jumpAtStart)
  • Method Details

    • get

      public float get(float t)
      Description copied from interface: EasingFunction
      Applies this easing function to an input value between 0f and 1f. Values outside of this range may produce unpredictable results.
      Specified by:
      get in interface EasingFunction
      Parameters:
      t - Normalized input value (0f to 1f)
      Returns:
      The eased output value.
    • toString

      public String toString()
      Overrides:
      toString in class Object