User Tools

Site Tools


wiki:quaternion

Quaternion

Quaternion is a global meta-table composed of 4 numbers (Its data) and some functions to manipulate these data.

Data

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

Functions

Operators

  • __add(Quaternion, Quaternion)
  • __sub(Quaternion, Quaternion)
  • __mul(Quaternion, number)
  • __mul(Quaternion, Quaternion)
  • __mul(Quaternion, Matrix3)
  • __mul(Quaternion, Vector3)
  • __div(Quaternion, number)
  • __tostring(Vector4)

new()

  • Description: Create an instance of Quaternion with x, y, z equals to zero and w equals to one
  • Signature: (): Quaternion

new(number, number, number)

  • Description: Create an instance of Vector4 with the given values
  • Signature: (x: number, y: number, z: number, z: number): Vector4

FIXME

wiki/quaternion.txt · Last modified: 2019/09/19 19:49 (external edit)