Quaternions are a generalization of complex numbers, which turn out to have a few applications in computing.
This library provides a Quaternion data type and some functions for manipulating them, together with another type for using them to represent rotations in 3D space.
Documentation is on Pursuit.