Vec4:angle

Edit

Returns the angle between vectors.



Arguments

NameTypeDescription
uVec4 The other vector.

Returns

NameTypeDescription
anglenumber The angle to other vector, in radians.

Arguments

NameTypeDescription
xnumber The x component of the other vector.
ynumber The y component of the other vector.
znumber The z component of the other vector.
wnumber The w component of the other vector.

Returns

NameTypeDescription
anglenumber The angle to other vector, in radians.

Notes

If any of the two vectors have a length of zero, the angle between them is not well defined. In this case the function returns math.pi / 2.

See also