angle_vectors_xy

compas.geometry.angle_vectors_xy(u, v, deg=False, tol=0.0001)[source]

Compute the smallest angle between the XY components of two vectors.

Parameters
  • u ([float, float] or [float, float, float] | compas.geometry.Vector) – The first 2D or 3D vector (Z will be ignored).

  • v ([float, float] or [float, float, float] | compas.geometry.Vector) – The second 2D or 3D vector (Z will be ignored).

  • deg (bool, optional) – If True, returns the angle in degrees.

  • tol (float, optional) – Tolerance for the length of the vectors.

Returns

float – The smallest angle in radians (in degrees if deg == True). The angle is always positive.

Examples

>>>