From 92ac46df6afa8ee76f972cceb681cf32658f84a2 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 12 Jun 2023 23:07:36 +0200 Subject: Start generation from player position --- src/Math/Vector.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Math/Vector.hpp') diff --git a/src/Math/Vector.hpp b/src/Math/Vector.hpp index 9cc2d75..ccfa556 100644 --- a/src/Math/Vector.hpp +++ b/src/Math/Vector.hpp @@ -65,6 +65,10 @@ public: return map([=](auto x) { return x / m; }); } + T distance(Vector other) const { + return (*this - other).magnitude(); + } + Vector abs() const { return map([=](auto x) { return std::abs(x); }); } -- cgit 1.4.1