Skip to main content

class CubicBezier

Source

Evaluate the CSS cubic-bezier timing function. x1 and x2 must be in [0, 1].

Functionsโ€‹

makeโ€‹

public static std::expected<CubicBezier, ValueError> make(double x1, double y1, double x2, double y2)

sampleโ€‹

public double sample(double progress)

Clamp finite input to [0, 1]. NaN and infinity return 0.