Vec4:sub

Subtracts a vector or a number from the vector.


v = Vec4:sub(u)

Arguments

NameTypeDescription
uVec4 The other vector.

Returns

NameTypeDescription
vVec4 The original vector.

v = Vec4:sub(x, y, z, w)

Arguments

NameTypeDefaultDescription
xnumber A value to subtract from x component.
ynumberx A value to subtract from y component.
znumberx A value to subtract from z component.
wnumberx A value to subtract from w component.

Returns

NameTypeDescription
vVec4 The original vector.

See also