# pwu::Quaternion

Utility functions for quaternions, which are represented as a list of four real values (x, y, z, and angle).

Summary
 pwu:: Quaternion Utility functions for quaternions, which are represented as a list of four real values (x, y, z, and angle). Static Actions zero Return a quaternion that represents no rotation set Return a quaternion with the given axis and angle axis Get the axis vector of a quaternion angle Get the angle of a quaternion equal Check if two quaternions are equal notEquals Check if two quaternions are not equal rotate Rotate one quaternion by another quaternion inverse Return the inverse of a quaternion normalize Return the normalization of a quaternion

### zero

 pwu::Quaternion zero

Return a quaternion that represents no rotation

none

a quaternion

### set

 pwu::Quaternion set axis angle

Return a quaternion with the given axis and angle

#### Parameters

 axis the axis of the quaternion angle the angle in degrees of the quaternion

a quaternion

### axis

 pwu::Quaternion axis quat

Get the axis vector of a quaternion

#### Parameters

 quat the quaternion

the axis vector

### angle

 pwu::Quaternion angle quat

Get the angle of a quaternion

#### Parameters

 quat the quaternion

#### Returns

the angle in degrees

### equal

 pwu::Quaternion equal quat1 quat2

Check if two quaternions are equal

#### Parameters

 quat1 the first quaternion quat2 the second quaternion

#### Returns

true if the quaternions are equal

### notEquals

Check if two quaternions are not equal

#### Parameters

 quat1 the first quaternion quat2 the second quaternion

#### Returns

true if the quaternions are not equal

### rotate

 pwu::Quaternion rotate quat1 quat2

Rotate one quaternion by another quaternion

#### Parameters

 quat1 the first quaternion quat2 the second quaternion

#### Returns

the rotated quaternion

### inverse

 pwu::Quaternion inverse quat

Return the inverse of a quaternion

#### Parameters

 quat the quaternion

#### Returns

the normalized quaternion

### normalize

 pwu::Quaternion normalize quat

Return the normalization of a quaternion

#### Parameters

 quat the quaternion

#### Returns

the normalized quaternion

 pwu::Quaternion zero
Return a quaternion that represents no rotation
 pwu::Quaternion set axis angle
Return a quaternion with the given axis and angle
 pwu::Quaternion axis quat
Get the axis vector of a quaternion
 pwu::Quaternion angle quat
Get the angle of a quaternion
 pwu::Quaternion equal quat1 quat2
Check if two quaternions are equal
 pwu::Quaternion rotate quat1 quat2
Rotate one quaternion by another quaternion
 pwu::Quaternion inverse quat
Return the inverse of a quaternion
 pwu::Quaternion normalize quat
Return the normalization of a quaternion