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 (list) – XY(Z) components of the vector.

  • scale (float) – Scale factor.

Returns

list – The scaled vector in the XY-plane (Z = 0.0).

Examples

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