vector.distance
EditReturns the distance between two vectors.
distance = vector.distance(a, b)Arguments
| Name | Type | Description |
| a | vector | The first vector. |
| b | vector | The second vector. |
Returns
| Name | Type | Description |
| distance | number | The distance between the two vectors. |
Notes
This is short for vector.length(v1 - v2).
Example
vector.distance(vector(0, 0, 0), vector(10, 0, 0)) --> 10