From 760a85015720ba4177a116678cfd305fe1ff2ea9 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 21 Apr 2018 19:42:06 +0200 Subject: Gathering mechanic for scientists. --- src/math.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/math.hpp') diff --git a/src/math.hpp b/src/math.hpp index 97e3b6b..d0b474e 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -388,6 +388,12 @@ public: return true; } + static rect_t around(vec_t v, T r) + { + vec_t R(r, r); + return rect_t(v - R, v + R); + } + friend bool operator&&(const rect_t &a, const rect_t &b) { for (size_t i = 0; i < N; i++) -- cgit