dot_vectors

compas.geometry.dot_vectors(u, v)[source]

Compute the dot product of two vectors.

Parameters:
u[float, float, float] | compas.geometry.Vector

XYZ components of the first vector.

v[float, float, float] | compas.geometry.Vector

XYZ components of the second vector.

Returns:
float

The dot product of the two vectors.

Examples

>>> dot_vectors([1.0, 0, 0], [2.0, 0, 0])
2.0