CubicBezierEasing

class CubicBezierEasing(x1: Float, y1: Float, x2: Float, y2: Float) : Easing

An Easing defined by a cubic bezier curve.

The control points (x1, y1) and (x2, y2) define the shape of the curve, where x represents time and y represents progress. The start point (0, 0) and end point (1, 1) are implicit.

Delegates to Android's PathInterpolator for efficient native evaluation.

// Material Design emphasized easing
val emphasized = CubicBezierEasing(0.2f, 0.0f, 0.0f, 1.0f)

Parameters

x1

X coordinate of the first control point. Must be in 0, 1.

y1

Y coordinate of the first control point.

x2

X coordinate of the second control point. Must be in 0, 1.

y2

Y coordinate of the second control point.

Constructors

Link copied to clipboard
constructor(x1: Float, y1: Float, x2: Float, y2: Float)

Functions

Link copied to clipboard

Converts this Easing to an Android Interpolator.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun transform(fraction: Float): Float

Transforms a normalized time fraction into an eased output fraction.