Interpolatable
public protocol Interpolatable
Conforming types can be linearly interpolated.
-
Interpolate between the given values.
Declaration
Swift
func interpolatedTo(_ to: Self, alpha: Scalar) -> Self
Parameters
from
The value to interpolate from.
to
The value to interpolate to.
alpha
The amount to interpolate between
from
andto
, where 0.0 is fully weighted towardfrom
, and 1.0 is fully weighted towardto
.Return Value
The interpolated result.
-
Interpolates between
self
andto
Declaration
Swift
mutating func interpolateTo(_ to: Self, alpha: Scalar)