Vec3:equals
EditReturns whether a vector is approximately equal to another vector.
Arguments
Name | Type | Description |
u | Vec3 | The other vector. |
Returns
Name | Type | Description |
equal | boolean | Whether the 2 vectors approximately equal each other. |
Arguments
Name | Type | Description |
x | number | The x component of the other vector. |
y | number | The y component of the other vector. |
z | number | The z component of the other vector. |
Returns
Name | Type | Description |
equal | boolean | 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
.