Vector3Multiplicative

public protocol Vector3Multiplicative : Vector3Additive, VectorMultiplicative where Self.SubVector2 : Vector2Multiplicative

Protocol for 3D vector types with multiplicable scalars.

  • unitX Default implementation

    Gets 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 implementation

    Gets 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 implementation

    Gets 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, and c: a x (b x c).

    Can be used to derive a vector perpendicular to ab, such that it points in the direction of ac.

    Default Implementation

    Declaration

    Swift

    func tripleProduct(_ b: Self, _ c: Self) -> Self