Add a debug-only function to pretty-print Line objects.

This commit is contained in:
King_DuckZ 2014-08-01 17:02:20 +02:00
parent c3baee5b9c
commit df8f5ca6b2

View file

@ -116,4 +116,17 @@ namespace cloonel {
const T dotproduct = dot(linePerp, pt);
return (dotproduct <= T(0));
}
#if !defined(NDEBUG)
///--------------------------------------------------------------------------
///--------------------------------------------------------------------------
template <typename T, uint32_t S>
std::ostream& operator<< ( std::ostream& parStream, const Line<T, S>& parLine ) {
for (uint32_t z = 0; z < S - 1; ++z) {
parStream << parLine[z] << "-";
}
parStream << parLine[S - 1];
return parStream;
}
#endif
} //namespace cloonel