Class StepEasing
java.lang.Object
dev.prozilla.pine.common.math.easing.StepEasing
- All Implemented Interfaces:
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 between0f
and1f
. Values outside of this range may produce unpredictable results.- Specified by:
get
in interfaceEasingFunction
- Parameters:
t
- Normalized input value (0f
to1f
)- Returns:
- The eased output value.
-
toString
-