vector.length

Edit

Returns the length of the vector.

length = vector.length()

Arguments

None

Returns

NameTypeDescription
lengthnumber The length of the vector.

Notes

The length of a vector is computed as:

math.sqrt(x ^ 2 + y ^ 2 + z ^ 2)

Example

vector(0, 5, 0):length() --> 5
vector(3, 4):length() --> 5

See also