Vec3:equals

Edit

Returns whether a vector is approximately equal to another vector.



Arguments

NameTypeDescription
uVec3 The other vector.

Returns

NameTypeDescription
equalboolean Whether the 2 vectors approximately equal each other.

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.

Returns

NameTypeDescription
equalboolean Whether the 2 vectors approximately equal each other.

Notes

To handle floating point precision issues, this function returns true as long as the squared distance between the vectors is below 1e-10.

See also