Interpolatable

public protocol Interpolatable

Conforming types can be linearly interpolated.

  • Interpolate between the given values.

    Declaration

    Swift

    func interpolated(to otherValue: Self, alpha: Scalar) -> Self

    Parameters

    from

    The value to interpolate from.

    to

    The value to interpolate to.

    alpha

    The amount to interpolate between from and to, where 0.0 is fully weighted toward from, and 1.0 is fully weighted toward to.

    Return Value

    The interpolated result.