Vector3Multiplicative
public protocol Vector3Multiplicative : Vector3Additive, VectorMultiplicative where Self.SubVector2 : Vector2Multiplicative
Protocol for 3D vector types with multiplicable scalars.
-
unitX
Default implementationGets the (x: 1, y: 0, z: 0) vector of this type.
Default Implementation
Gets the (x: 1, y: 0, z: 0) vector of this type.
Declaration
Swift
static var unitX: Self { get }
-
unitY
Default implementationGets the (x: 0, y: 1, z: 0) vector of this type.
Default Implementation
Gets the (x: 0, y: 1, z: 0) vector of this type.
Declaration
Swift
static var unitY: Self { get }
-
unitZ
Default implementationGets the (x: 0, y: 0, z: 1) vector of this type.
Default Implementation
Gets the (x: 0, y: 0, z: 1) vector of this type.
Declaration
Swift
static var unitZ: Self { get }
-
cross(_:
Default implementation) Performs a cross product between this vector and another vector.
Default Implementation
Declaration
Swift
func cross(_ other: Self) -> Self
-
tripleProduct(_:
Default implementation_: ) Performs a 3D vector triple product between
self
,b
, andc
:a x (b x c)
.Can be used to derive a vector perpendicular to
ab
, such that it points in the direction ofac
.Default Implementation
Declaration
Swift
func tripleProduct(_ b: Self, _ c: Self) -> Self