Class StepEasing
java.lang.Object
dev.prozilla.pine.common.math.easing.StepEasing
- All Implemented Interfaces:
Cloneable<StepEasing>,EasingFunction
An easing function that jumps between steps with an equal length instead of transitioning smoothly.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a new object that is equal to this object.booleanequals(StepEasing stepEasing) Checks if the given object is equal to this object.booleanfloatget(float t) Applies this easing function to an input value between0fand1f.toString()Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:EasingFunctionApplies this easing function to an input value between0fand1f. Values outside of this range may produce unpredictable results.- Specified by:
getin interfaceEasingFunction- Parameters:
t- Normalized input value (0fto1f)- Returns:
- The eased output value.
-
equals
-
equals
Description copied from interface:CloneableChecks if the given object is equal to this object.- Specified by:
equalsin interfaceCloneable<StepEasing>- Parameters:
stepEasing- Other object- Returns:
trueif both objects are equal.
-
toString
-
clone
Description copied from interface:CloneableReturns a new object that is equal to this object.- Specified by:
clonein interfaceCloneable<StepEasing>- Overrides:
clonein classObject- Returns:
- Clone of this object
-