Table of Contents

Class CubicBezierEase

Namespace
LansMap.Core.Control

Evaluates cubic Bezier easing curves for animation timing.

public static class CubicBezierEase
Inheritance
object
CubicBezierEase

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

double

EaseX2

CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).

public const double EaseX2 = 0.25

Field Value

double

EaseY1

CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).

public const double EaseY1 = 0.1

Field Value

double

EaseY2

CSS ease control points: cubic-bezier(0.25, 0.1, 0.25, 1.0).

public const double EaseY2 = 1

Field Value

double

Methods

Ease(double)

Eases a time fraction with the CSS ease curve.

public static double Ease(double t)

Parameters

t double

Time 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

t double

Time fraction, 0 to 1 (the x axis).

x1 double

First control point x, typically 0 to 1.

y1 double

First control point y.

x2 double

Second control point x, typically 0 to 1.

y2 double

Second control point y.

Returns

double

Eased value y(t).