quatmult#

torchspin.quatmult(q, r)[source]#

Quaternion multiplication (Hamilton product) q ⊗ r.

Parameters:
  • q (array_like, shape (4,) or (4, N)) – Unit quaternions. Both must have the same shape.

  • r (array_like, shape (4,) or (4, N)) – Unit quaternions. Both must have the same shape.

Returns:

t (ndarray, same shape as *q*) – Product quaternion.

Return type:

ndarray