Skip to main content

Quaternion

Index

Constructors

constructor

  • new Quaternion(x: number, y: number, z: number, w: number): Quaternion
  • new Quaternion(arr: [number, number, number, number]): Quaternion
  • new Quaternion(obj: IQuaternion): Quaternion
  • new Quaternion(value: number): Quaternion

Properties

publicreadonlyw

w: number

publicreadonlyx

x: number

publicreadonlyy

y: number

publicreadonlyz

z: number

publicstaticreadonlyone

one: Quaternion

(1, 1, 1, 1) quaternion

publicstaticreadonlyzero

zero: Quaternion

(0, 0, 0, 0) quaternion

Methods

publictoArray

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

publictoFixed

  • toFixed(precision: number): Quaternion
  • Returns the Quaternion with trimed decimals

publictoString

  • toString(): string