length_vector_sqrd_xy

compas.geometry.length_vector_sqrd_xy(vector)[source]

Compute the squared length of a vector, assuming it lies in the XY plane.

Parameters

vector ([float, float] or [float, float, float] | compas.geometry.Vector) – XY(Z) components of the vector.

Returns

float – The squared length.

Examples

>>> length_vector_sqrd_xy([1.0, 1.0])
2.0
>>> length_vector_sqrd_xy([1.0, 1.0, 0.0])
2.0
>>> length_vector_sqrd_xy([1.0, 1.0, 1.0])
2.0