UnitBezier
public struct UnitBezier
A bezier curve, often used to calculate timing functions.
-
The horizontal component of the first control point.
Declaration
Swift
public var p1x: Scalar
-
The vertical component of the first control point.
Declaration
Swift
public var p1y: Scalar
-
The horizontal component of the second control point.
Declaration
Swift
public var p2x: Scalar
-
The vertical component of the second control point.
Declaration
Swift
public var p2y: Scalar
-
Creates a new
UnitBezier
instance. -
Calculates the resulting
y
for givenx
.Parameters
x
The value to solve for.
epsilon
The required precision of the result (where
x * epsilon
is the maximum time segment to be evaluated).Return Value
The solved
y
value.
-
Solves for time
x
.