Quaternion

public struct Quaternion : Equatable

Quaternion type.

All rotations and axis systems follow the right-hand rule. The Hamilton quaternion product definition is used. A zero-rotation quaternion is represented by (1,0,0,0). The quaternion could also be written as w + xi + yj + zk.

For more info see: https://en.wikipedia.org/wiki/Quaternion

  • w

    Undocumented

    Declaration

    Swift

    public let w: Float
  • x

    Undocumented

    Declaration

    Swift

    public let x: Float
  • y

    Undocumented

    Declaration

    Swift

    public let y: Float
  • z

    Undocumented

    Declaration

    Swift

    public let z: Float
  • Initializes a new Quaternion.

    Declaration

    Swift

    public init(w: Float, x: Float, y: Float, z: Float)

    Parameters

    w

    Quaternion entry 0, also denoted as a

    x

    Quaternion entry 1, also denoted as b

    y

    Quaternion entry 2, also denoted as c

    z

    Quaternion entry 3, also denoted as d

  • Declaration

    Swift

    public static func == (lhs: Quaternion, rhs: Quaternion) -> Bool