The dot product of two vectors (or two quaternions), the sum of the products of matching components. For unit vectors it is the cosine of the angle between them. Also spelled dot.
assert(dot_product(xyz(1, 2, 3), xyz(4, 5, 6)) == 32);
assert(dot(xy(1, 0), xy(0, 1)) == 0);dot_product :: (a: Vector2, b: Vector2) -> float
The dot product of a and b.
Parameters
Returns
- float
dot_product :: (a: Vector3, b: Vector3) -> float
The dot product of a and b.
Parameters
Returns
- float
dot_product :: (a: Vector4, b: Vector4) -> float
The dot product of a and b.
Parameters
Returns
- float