From 768a7eaf8274328b0fa125684305adac587e3db5 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 22 Feb 2026 19:42:48 +0100 Subject: [PATCH] implement operator<< for ryalib vectors --- include/util.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/util.hpp diff --git a/include/util.hpp b/include/util.hpp new file mode 100644 index 0000000..205c87d --- /dev/null +++ b/include/util.hpp @@ -0,0 +1,18 @@ +#ifndef __UTIL_HPP_ +#define __UTIL_HPP_ + +#include +#include +#include + +inline std::ostream &operator<<(std::ostream &os, const Vector2 &v) { + os << "(" << v.x << ", " << v.y << ")"; + return os; +} + +inline std::ostream &operator<<(std::ostream &os, const Vector3 &v) { + os << "(" << v.x << ", " << v.y << ", " << v.z << ")"; + return os; +} + +#endif