Found an error in thequaternion class in the rot2quat function.