$LastChangedDate: 27-Juil-2011 $

# CL_rot_axAng2quat

Rotation axis and angle to quaternion

## Calling Sequence

       [q] = CL_rot_axAng2quat(u, alpha)

## Description

- Computes the quaternion q that corresponds to the rotation of angle alpha around the rotation axis u.

- Notes:

  - The output quaternion has a norm equal to 1.

  - For compatibility reasons, the argument order: (alpha, u) is also possible but should be avoided.

  - See Conventions or CL_rot_defQuat for more details on quaternions.

## Parameters

u :

  Rotation axis [ux;uy;uz]. ||u|| should be > 0 (3xN or 3x1)

alpha :

  Rotation angle [rad] (1xN or 1x1)

q :

  Quaternion (with norm equal to 1) (dim N)

## Authors

- CNES - DCT/SB

## See also

- CL_rot_defQuat

## Examples

    // 10 degree rotation around Z axis :
    alpha = CL_deg2rad(10);
    q1 = CL_rot_axAng2quat([0;0;1],alpha)

    // same :
    q2 = CL_rot_eul2quat(0,0,alpha)

    // same :
    M = CL_rot_angles2matrix(3,alpha);
    q3 = CL_rot_matrix2quat(M)