Add a debug-only function to pretty-print Line objects.
This commit is contained in:
parent
c3baee5b9c
commit
df8f5ca6b2
1 changed files with 13 additions and 0 deletions
13
src/line.inl
13
src/line.inl
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue