From c1ea14d1c96de18448c0c3779d30b7e1e4451f61 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 5 Feb 2021 00:30:13 +0000 Subject: Initial commit generating some basic rail network --- utility/stream_support.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 utility/stream_support.hpp (limited to 'utility/stream_support.hpp') diff --git a/utility/stream_support.hpp b/utility/stream_support.hpp new file mode 100644 index 0000000..6ab1bd1 --- /dev/null +++ b/utility/stream_support.hpp @@ -0,0 +1,20 @@ +#ifndef STREAM_SUPPORT_H +#define STREAM_SUPPORT_H + +#include + +template +std::ostream & +operator<<(std::ostream & s, glm::mat & m) +{ + for (int y = 0; y < m.length(); y++) { + const auto & col = m[y]; + for (int x = 0; x < col.length(); x++) { + s << col[x] << ", "; + } + s << "\n"; + } + return s; +} + +#endif -- cgit v1.2.3