Class CubicBezierEasing

java.lang.Object
dev.prozilla.pine.common.math.easing.CubicBezierEasing
All Implemented Interfaces:
EasingFunction

public class CubicBezierEasing extends Object implements EasingFunction
A cubic Bézier easing function.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final float
     
    protected final float
     
    protected final float
     
    protected final float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CubicBezierEasing(float p0, float p1, float p2, float p3)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    get(float t)
    Applies this easing function to an input value between 0f and 1f.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

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

    get
  • 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 point
      p1 - Y coordinate of first control point
      p2 - X coordinate of second control point
      p3 - 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 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object