lovr.math.newVec3

Creates a new 3D vector. This function takes the same arguments as Vec3:set.


v = lovr.math.newVec3(x, y, z)

Arguments

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

Returns

NameTypeDescription
vVec3 The new vector.

v = lovr.math.newVec3(u)

Arguments

NameTypeDescription
uVec3 A vector to copy the values from.

Returns

NameTypeDescription
vVec3 The new vector.

v = lovr.math.newVec3(m)

Arguments

NameTypeDescription
mMat4 A matrix to use the position of.

Returns

NameTypeDescription
vVec3 The new vector.

See also