lovr.math.vec4

Creates a temporary 4D vector. This function takes the same arguments as Vec4:set.


v = lovr.math.vec4(x, y, z, w)

Arguments

NameTypeDefaultDescription
xnumber0 The x value of the vector.
ynumberx The y value of the vector.
znumberx The z value of the vector.
wnumberx The w value of the vector.

Returns

NameTypeDescription
vVec4 The new vector.

v = lovr.math.vec4(u)

Arguments

NameTypeDescription
uVec4 A vector to copy the values from.

Returns

NameTypeDescription
vVec4 The new vector.

See also