Vector.create
From GiderosMobile
Available since: Gideros 2026.1
Class: vector library
Description
Creates a new vector with the given component values.
(vector) = vector.create(x,y[,z])
The third (z) component is set to 0 if it is not defined.
Parameters
x: (number) the x component value
y: (number) the y component value
z: (number) the z component value optional
Return values
Returns (vector) the new vector
Example
local vec : vector = vector.create(1, 2, 3)
print(vec) -- 1, 2, 3
local vec2 : vector = vector.create(1, 2)
print(vec2) -- 1, 2, 0