BLT/include/blt/math/log_util.h

27 lines
610 B
C
Raw Normal View History

2023-03-14 18:01:05 -04:00
/*
* Created by Brett on 14/03/23.
* Licensed under GNU General Public License V3.0
* See LICENSE file for license detail
*/
#ifndef BLT_TESTS_LOG_UTIL_H
#define BLT_TESTS_LOG_UTIL_H
#include <blt/math/vectors.h>
#include <blt/math/matrix.h>
#include <blt/std/logging.h>
namespace blt {
template<typename T, unsigned long size>
static inline logging::logger& operator<<(logging::logger& log, blt::vec<T, size> vec){
log << "(";
for (int i = 0; i < size; i++)
2023-03-14 18:02:20 -04:00
log << vec[i] << ((i == size-1) ? ")" : ", ");
2023-03-14 18:01:05 -04:00
return log;
}
}
#endif //BLT_TESTS_LOG_UTIL_H