euler_to_quaternion

giant.rotations.core.conversions:

giant.rotations.core.conversions.euler_to_quaternion(angles, order='xyz')[source]

This function converts Euler angles into a a rotation quaternion.

Currently this is just done through a call to euler_to_rotmat() followed by a call to rotmat_to_quaternion().

Parameters:
  • angles (Sequence[float | Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]] | ndarray[tuple[Any, ...], dtype[float64]]) – The angles to convert

  • order (Literal['xyz', 'xzy', 'xyx', 'xzx', 'yxz', 'yzx', 'yxy', 'yzy', 'zxy', 'zyx', 'zyz', 'zxz']) – the order of the angles

Returns:

The rotation quaternion(s)

Return type:

ndarray[tuple[Any, …], dtype[float64]]