math.length
Computes the length of a 2D vector.
Usage
Arguments
| Name | Type | Description |
x | number | X coordinate of the vector. |
y | number | Y coordinate of the vector. |
Returns
| Name | Type | Description |
length | number | Vector length. |
Examples
local d = math.length(0, 5);
print(d); -- Prints "5"