summaryrefslogtreecommitdiff
path: root/src/math.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/math.hpp')
-rw-r--r--src/math.hpp5
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);