Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Quaternion

Hierarchy

  • Quaternion

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • x: number
    • y: number
    • z: number
    • w: number

    Returns Quaternion

  • Parameters

    • arr: [number, number, number, number]

    Returns Quaternion

  • Parameters

    Returns Quaternion

  • Parameters

    • value: number

    Returns Quaternion

Properties

Readonly w

w: number

Readonly x

x: number

Readonly y

y: number

Readonly z

z: number

Static Readonly one

(1, 1, 1, 1) quaternion

Static Readonly zero

(0, 0, 0, 0) quaternion

Methods

toArray

  • toArray(): [number, number, number, number]
  • Returns [x, y, z, w] array.

    Returns [number, number, number, number]

toFixed

  • Returns the Quaternion with trimed decimals

    Parameters

    • precision: number

      Precision to trim the values. Defaults to 4

    Returns Quaternion

toString

  • toString(): string
  • Returns string