CubicBezierEasing

Class

Common
public class CubicBezierEasing(
    private val a: Float,
    private val b: Float,
    private val c: Float,
    private val d: Float,
) : Easing

A cubic polynomial easing.

The CubicBezierEasing class implements third-order Bézier curves.

This is equivalent to the Android PathInterpolator when a single cubic Bézier curve is specified.

Note: CubicBezierEasing instances are stateless and can be used concurrently from multiple threads.

Rather than creating a new instance, consider using one of the common cubic Easings:

Parameters

aThe x coordinate of the first control point. The line through the point (0, 0) and the first control point is tangent to the easing at the point (0, 0).
bThe y coordinate of the first control point. The line through the point (0, 0) and the first control point is tangent to the easing at the point (0, 0).
cThe x coordinate of the second control point. The line through the point (1, 1) and the second control point is tangent to the easing at the point (1, 1).
dThe y coordinate of the second control point. The line through the point (1, 1) and the second control point is tangent to the easing at the point (1, 1).