implement operator<< for ryalib vectors

This commit is contained in:
2026-02-22 19:42:48 +01:00
parent 9726d5fecc
commit 768a7eaf82

18
include/util.hpp Normal file
View File

@ -0,0 +1,18 @@
#ifndef __UTIL_HPP_
#define __UTIL_HPP_
#include <iostream>
#include <raylib.h>
#include <raymath.h>
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