diff options
Diffstat (limited to 'src/math.hpp')
-rw-r--r-- | src/math.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/math.hpp b/src/math.hpp index 13eb36a..5e117fd 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -216,6 +216,11 @@ public: return r; } + vec_t<T, N> wrap(void) + { + return *this - this->floor(); + } + T len(void) { return std::sqrt(*this * *this); |