Class CubicBezierEasing
java.lang.Object
dev.prozilla.pine.common.math.easing.CubicBezierEasing
- All Implemented Interfaces:
EasingFunction
A cubic Bézier easing function.
-
Field Details
-
p0
protected final float p0 -
p1
protected final float p1 -
p2
protected final float p2 -
p3
protected final float p3
-
-
Constructor Details
-
CubicBezierEasing
public CubicBezierEasing(float p0, float p1, float p2, float p3) - Parameters:
p0
- X coordinate of first control pointp1
- Y coordinate of first control pointp2
- X coordinate of second control pointp3
- Y coordinate of second control point
-
-
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
-