X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fquaternion%2Fquaternion_print.h;h=483dfc4cefec591321ddcbbad3df2773df9f8118;hp=dd73d3c58fdfa2ad7fccf9181c056d71ef1b9660;hb=40755d4c6251206c18ce4784967d3a910cee096f;hpb=c2321281bf12a7efaedde930422c7ddbc92080d4 diff --git a/src/Moof/cml/quaternion/quaternion_print.h b/src/Moof/cml/quaternion/quaternion_print.h index dd73d3c..483dfc4 100644 --- a/src/Moof/cml/quaternion/quaternion_print.h +++ b/src/Moof/cml/quaternion/quaternion_print.h @@ -48,11 +48,21 @@ operator<<(std::ostream& os, const cml::quaternion& q) template std::ostream& operator<<(std::ostream& os, const cml::quaternion& q) { - os << "["; - for (size_t i = 0; i < 4; ++i) { - os << " " << q[i]; - } - os << " ]"; + typedef typename cml::quaternion::order_type order_type; + enum { + W = order_type::W, + X = order_type::X, + Y = order_type::Y, + Z = order_type::Z + }; + + os << "[ " + << " " << q[W] + << " " << q[X] + << " " << q[Y] + << " " << q[Z] + << " ]"; + return os; }