vec3:sub

Subtracts a vector from this vector.

v = vec3:sub(u)

Arguments

NameTypeDescription
uvec3The other vector.

Returns

NameTypeDescription
vvec3The original vector.

Notes

This function modifies v and sets the values to equal the subtracted values, like this:

v.x, v.y, v.z = v.x - u.x, v.y - u.y, v.z - u.z

See also