Class StepEasing

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected final boolean
     
    protected final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StepEasing(int steps)
     
    StepEasing(int steps, boolean jumpAtStart)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a new object that is equal to this object.
    boolean
    equals(StepEasing stepEasing)
    Checks if the given object is equal to this object.
    boolean
    equals(Object object)
     
    float
    get(float t)
    Applies this easing function to an input value between 0f and 1f.
     

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface dev.prozilla.pine.common.math.easing.EasingFunction

    get
  • 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.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(StepEasing stepEasing)
      Description copied from interface: Cloneable
      Checks if the given object is equal to this object.
      Specified by:
      equals in interface Cloneable<StepEasing>
      Parameters:
      stepEasing - Other object
      Returns:
      true if both objects are equal.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public StepEasing clone()
      Description copied from interface: Cloneable
      Returns a new object that is equal to this object.
      Specified by:
      clone in interface Cloneable<StepEasing>
      Overrides:
      clone in class Object
      Returns:
      Clone of this object