VectorConvertible

public protocol VectorConvertible : Interpolatable, Equatable

Conforming types can be converted to and from vector types.

  • The concrete VectorType implementation that can represent the conforming type.

    Declaration

    Swift

    associatedtype VectorType : Vector
  • Creates a new instance from a vector.

    Declaration

    Swift

    init(vector: VectorType)
  • The vector representation of this instance.

    Declaration

    Swift

    var vector: VectorType { get }
  • zero Extension method

    Returns an instance initialized using the zero vector.

    Declaration

    Swift

    public static var zero: Self { get }
  • interpolated(to:alpha:) Extension method

    Interpolates between values.

    Declaration

    Swift

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

    Parameters

    to

    The value to interpolate to.

    alpha

    The amount (between 0.0 and 1.0) to interpolate, where 0 returns the receiver, and 1 returns the to value.

    Return Value

    The interpolated result.