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 Details

    • x1

      protected final float x1
    • y1

      protected final float y1
    • x2

      protected final float x2
    • y2

      protected final float y2
  • Constructor Details

    • CubicBezierEasing

      public CubicBezierEasing(Vector4f vector4f)
    • CubicBezierEasing

      public CubicBezierEasing(float x1, float y1, float x2, float y2)
      Parameters:
      x1 - X coordinate of first control point
      y1 - Y coordinate of first control point
      x2 - X coordinate of second control point
      y2 - 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.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(CubicBezierEasing cubicBezierEasing)
      Description copied from interface: Cloneable
      Checks if the given object is equal to this object.
      Specified by:
      equals in interface Cloneable<CubicBezierEasing>
      Parameters:
      cubicBezierEasing - Other object
      Returns:
      true if both objects are equal.
    • clone

      public CubicBezierEasing clone()
      Description copied from interface: Cloneable
      Returns a new object that is equal to this object.
      Specified by:
      clone in interface Cloneable<CubicBezierEasing>
      Overrides:
      clone in class Object
      Returns:
      Clone of this object
    • toString

      public String toString()
      Overrides:
      toString in class Object