Class CubicBezierEasing
java.lang.Object
dev.prozilla.pine.common.math.easing.CubicBezierEasing
- All Implemented Interfaces:
Cloneable<CubicBezierEasing>,EasingFunction
public class CubicBezierEasing
extends Object
implements EasingFunction, Cloneable<CubicBezierEasing>
A cubic Bézier easing function.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCubicBezierEasing(float x1, float y1, float x2, float y2) CubicBezierEasing(Vector4f vector4f) -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a new object that is equal to this object.booleanequals(CubicBezierEasing cubicBezierEasing) 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
-
x1
protected final float x1 -
y1
protected final float y1 -
x2
protected final float x2 -
y2
protected final float y2
-
-
Constructor Details
-
CubicBezierEasing
-
CubicBezierEasing
public CubicBezierEasing(float x1, float y1, float x2, float y2) - Parameters:
x1- X coordinate of first control pointy1- Y coordinate of first control pointx2- X coordinate of second control pointy2- Y coordinate of second control point
-
-
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<CubicBezierEasing>- Parameters:
cubicBezierEasing- Other object- Returns:
trueif both objects are equal.
-
clone
Description copied from interface:CloneableReturns a new object that is equal to this object.- Specified by:
clonein interfaceCloneable<CubicBezierEasing>- Overrides:
clonein classObject- Returns:
- Clone of this object
-
toString
-