archimedes.spatial.quaternion_multiplyΒΆ
- archimedes.spatial.quaternion_multiply(q1: ndarray, q2: ndarray) ndarrayΒΆ
Multiply (compose) two quaternions
- Parameters:
q1 (array_like, shape (4,)) β First quaternion [w1, x1, y1, z1]
q2 (array_like, shape (4,)) β Second quaternion [w2, x2, y2, z2]
- Returns:
Resulting quaternion from multiplication q = q1 * q2
- Return type:
np.ndarray, shape (4,)
Notes
This function uses the scalar-first convention for quaternions, i.e. a quaternion is represented as [w, x, y, z], where w is the scalar part.