norm_vector
- compas.geometry.norm_vector(vector)[source]
Calculate the length of a vector.
- Parameters
vector ([float, float, float] |
Vector
) – XYZ components of the vector.- Returns
float – The L2 norm, or length of the vector.
Examples
>>> norm_vector([2.0, 0.0, 0.0]) 2.0
>>> norm_vector([1.0, 1.0, 0.0]) == sqrt(2.0) True