// // test_printers.h // math-test // // Created by Sam Jaffe on 5/5/19. // Copyright © 2019 Sam Jaffe. All rights reserved. // #ifndef test_printers_h #define test_printers_h #pragma once #include "game/math/shape.hpp" namespace math { namespace vector { inline std::ostream & operator<<(std::ostream & os, math::vec2 const & p) { return os << '[' << p[0] << ',' << p[1] << ']'; } }} namespace math { namespace dim2 { inline bool operator==(line const & lhs, line const & rhs) { return lhs.first == rhs.first && lhs.second == rhs.second; } inline bool operator==(quad const & lhs, quad const & rhs) { return lhs.ll == rhs.ll && lhs.lr == rhs.lr && lhs.ul == rhs.ul && lhs.ur == rhs.ur; } inline std::ostream & operator<<(std::ostream & os, line const & l) { return os << '[' << l.first << ',' << l.second << ']'; } }} #endif /* test_printers_h */