summaryrefslogtreecommitdiff
path: root/utility/stream_support.hpp
blob: 6ab1bd16892742e16ba6216a9bc566e087c426a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef STREAM_SUPPORT_H
#define STREAM_SUPPORT_H

#include <iostream>

template<glm::length_t L, glm::length_t R, typename T, glm::qualifier Q>
std::ostream &
operator<<(std::ostream & s, glm::mat<L, R, T, Q> & 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