diff options
Diffstat (limited to 'include/vector2.hpp')
-rw-r--r-- | include/vector2.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vector2.hpp b/include/vector2.hpp index c1148da..828654c 100644 --- a/include/vector2.hpp +++ b/include/vector2.hpp @@ -84,6 +84,10 @@ struct vector2 { return (x < v.x) && (y < v.y); } + bool operator<=(const T& n) const { + return (x <= n) && (y <= n); + } + // other functions std::string toString(void) const { return "(" + std::to_string(x) + ", " + std::to_string(y) + ")"; |