Add existing quaternion C++ code.