Skip to main content

Quaternion(number x, number y, number z, number w)

Constructs new Quaternion with given x,y,z,w components.

Parameters:

NameTypeDescription
xnumberx
ynumbery
znumberz
wnumberw

Usage

---@type number
local x;

---@type number
local y;

---@type number
local z;

---@type number
local w;


local quaternion = Quaternion(x, y, z, w);

Example

local quat = Quaternion(1, 5.9, 3, 2.5);