skrobot.coordinates.math.quaternion_multiply¶
- skrobot.coordinates.math.quaternion_multiply(quaternion1, quaternion0)[source]¶
Return multiplication of two quaternions.
- Parameters:
quaternion0 (list or numpy.ndarray) – [w, x, y, z]
quaternion1 (list or numpy.ndarray) – [w, x, y, z]
- Returns:
quaternion – [w, x, y, z]
- Return type:
Examples
>>> q = quaternion_multiply([4, 1, -2, 3], [8, -5, 6, 7]) >>> numpy.allclose(q, [28, -44, -14, 48]) True