quaternion math in c