Struct style::bezier::Bezier [] [src]

pub struct Bezier { /* fields omitted */ }

A unit cubic Bézier curve, used for timing functions in CSS transitions and animations.

Methods

impl Bezier
[src]

[src]

Create a unit cubic Bézier curve from the two middle control points.

X coordinate is time, Y coordinate is function advancement. The nominal range for both is 0 to 1.

The start and end points are always (0, 0) and (1, 1) so that a transition or animation starts at 0% and ends at 100%.

[src]

Solve the bezier curve for a given x and an epsilon, that should be between zero and one.