UnitBezier
public struct UnitBezier : Equatable
A bezier curve, often used to calculate timing functions.
-
Undocumented
Declaration
Swift
public var first: ControlPoint
-
Undocumented
Declaration
Swift
public var second: ControlPoint
-
Creates a new
UnitBezier
instance.Declaration
Swift
public init(first: ControlPoint, second: ControlPoint)
-
Undocumented
Declaration
Swift
public init(firstX: Double, firstY: Double, secondX: Double, secondY: Double)
-
Calculates the resulting
y
for givenx
.Declaration
Swift
public func solve(x: Double, epsilon: Double) -> Double
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.
-
A control point for a unit bezier.
See moreDeclaration
Swift
public struct ControlPoint : Equatable