A quaternion simply
is a
vector of the form [s, x, y, z]T, where s relates to an angle θ, and [x, y,
z]T =
a
defines a unit axis to rotate about.

Quaternions
provide an alternative way to model rotations. The mathematics of quaternions relies
on
hypercomplex
numbers involving three imaginary numbers, which some find a bit
exotic.
GLM supports quaternions:
#include
"./include/glm/gtc/quaternion.hpp“glm::quat
q1 = glm::angleAxis(90.0f,
glm::vec3(0.0f,
1.0f, 0.0f));