Vec4:dot

Returns the dot product between this vector and another one.


dot = Vec4:dot(u)

Arguments

NameTypeDescription
uVec4 The vector to compute the dot product with.

Returns

NameTypeDescription
dotnumber The dot product between v and u.

dot = Vec4:dot(x, y, z, w)

Arguments

NameTypeDescription
xnumber A value of x component to compute the dot product with.
ynumber A value of y component to compute the dot product with.
znumber A value of z component to compute the dot product with.
wnumber A value of w component to compute the dot product with.

Returns

NameTypeDescription
dotnumber The dot product between v and u.

Notes

This is computed as:

dot = v.x * u.x + v.y * u.y + v.z * u.z + v.w * u.w

The vectors are not normalized before computing the dot product.

See also