Add quaternion functions.