diff --git a/src/vector.hpp b/src/vector.hpp index 41dd2b8..696d92a 100644 --- a/src/vector.hpp +++ b/src/vector.hpp @@ -24,6 +24,10 @@ #include #include +#if !defined(NDEBUG) +#include +#endif + namespace cloonel { template class Vector { @@ -111,6 +115,19 @@ namespace cloonel { typedef Vector float2; typedef Vector ushort2; typedef Vector int2; + +#if !defined(NDEBUG) + template + std::ostream& operator<< ( std::ostream& parStream, const Vector& parVector ) { + parStream << "<"; + for (uint32_t z = 0; z < S - 1; ++z) { + parStream << parVector[z] << ","; + } + parStream << parVector[S - 1] << ">"; + return parStream; + } +#endif + } //namespace cloonel #include "vector.inl" #endif