From 22f3bad59de14b62c6680d10aff2cea5ac5b11dc Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 9 Apr 2024 03:34:50 +0200 Subject: Traverse all chunk blocks in a unified (and cache-friendly) way --- src/Math/Vector.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Math/Vector.hpp') diff --git a/src/Math/Vector.hpp b/src/Math/Vector.hpp index 3525e42..d179049 100644 --- a/src/Math/Vector.hpp +++ b/src/Math/Vector.hpp @@ -204,6 +204,12 @@ struct Vector { T& w() { static_assert(S > 3); return elements[3]; } const T& w() const { static_assert(S > 3); return elements[3]; } + std::array values() const { + std::array result{}; + for (UInt i = 0; i < S; i++) result[i] = elements[i]; + return result; + } + std::string string() const { std::stringstream str{}; -- cgit 1.4.1