scale_vector_xy

compas.geometry.scale_vector_xy(vector, factor)[source]

Scale a vector by a given factor, assuming it lies in the XY plane.

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

XY(Z) components of the vector.

scalefloat

Scale factor.

Returns:
[float, float, 0.0]

The scaled vector in the XY-plane.

Examples

>>> scale_vector_xy([1.0, 2.0, 3.0], 2.0)
[2.0, 4.0, 0.0]