angle_vectors_xy

compas.geometry.angle_vectors_xy(u, v, deg=False, tol=None)[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).

degbool, optional

If True, returns the angle in degrees.

tolfloat, optional

The tolerance for comparing values to zero. Default is TOL.absolute.

Returns:
float

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

Examples

>>>