VectorConvertible
public protocol VectorConvertible : Equatable
Conforming types can be converted to and from vector types.
This is the single requirement for any type that is to be animated
by Animator
, Simulator
, or Spring
.
-
The concrete VectorType implementation that can represent the conforming type.
Declaration
Swift
associatedtype VectorType : SIMD where Self.VectorType.Scalar == Double
-
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 methodReturns an instance initialized using the zero vector.
Declaration
Swift
public static var zero: Self { get }