length_vector

compas.geometry.length_vector(vector)[source]

Calculate the length of the vector.

Parameters:
vector[float, float, float] | compas.geometry.Vector

XYZ components of the vector.

Returns:
float

The length of the vector.

Examples

>>> length_vector([2.0, 0.0, 0.0])
2.0
>>> length_vector([1.0, 1.0, 0.0]) == sqrt(2.0)
True