Skip to content

Api > Quaternion > Constructor


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

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

Parameters:⚓︎

Name Type Description
x number x
y number y
z number z
w number w

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);