Class CubicBezierEase
Evaluates cubic Bezier easing curves for animation timing.
public static class CubicBezierEase
- Inheritance
-
objectCubicBezierEase
Remarks
CSS/SVG form with endpoints (0,0) and (1,1) and free control points (x1,y1) and (x2,y2). Given a time fraction t on the x axis, returns y(t). Allocates nothing: no delegates, no closures, fixed iteration counts.
Fields
EaseX1
CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).
public const double EaseX1 = 0.25
Field Value
EaseX2
CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).
public const double EaseX2 = 0.25
Field Value
EaseY1
CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).
public const double EaseY1 = 0.1
Field Value
EaseY2
CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).
public const double EaseY2 = 1
Field Value
Methods
Ease(double)
Eases a time fraction with the CSS ease curve.
public static double Ease(double t)
Parameters
tdoubleTime fraction, 0 to 1.
Returns
- double
Eased value, 0 to 1.
Evaluate(double, double, double, double, double)
Eases a time fraction with a caller-supplied cubic Bezier.
public static double Evaluate(double t, double x1, double y1, double x2, double y2)
Parameters
tdoubleTime fraction, 0 to 1 (the x axis).
x1doubleFirst control point x, typically 0 to 1.
y1doubleFirst control point y.
x2doubleSecond control point x, typically 0 to 1.
y2doubleSecond control point y.
Returns
- double
Eased value y(t).