From 820e2e9d428c273e065cfe18b48c183a5cbedd75 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 16 Dec 2017 19:06:43 +0100 Subject: Major refactor of game's entity code. --- src/math.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/math.hpp') diff --git a/src/math.hpp b/src/math.hpp index 5e117fd..e393015 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -352,6 +352,16 @@ public: return r; } + friend rect_t operator+(const rect_t &a, const vec_t &b) + { + rect_t r; + + r[0] = a[0] + b; + r[1] = a[1] + b; + + return r; + } + friend std::ostream& operator<<(std::ostream& stream, rect_t r) { stream << "(" << r[0] << " x " << r[1] << ")"; -- cgit