Interpolatable
public protocol Interpolatable
A type that can be interpolated from a start and end value.
-
Calculates the value between a start and end position at a specific point in time.
Declaration
Swift
static func interpolate(from start: Self, to end: Self, time: TimeInterval) -> SelfParameters
startThe start value to interpolate from, the minimum value.
endThe end value to interpolate to, the maximum value.
timeA percentage between 0 and 1 that represents time. The interpolated value is calculated by multiplying the change in value by the percentage of time.
Return Value
The value interpolated between the start and end.
View on GitHub
Interpolatable Protocol Reference