summaryrefslogtreecommitdiff
path: root/src/math.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-16 15:32:44 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-16 15:32:44 +0100
commita62ac36a7e401b39d760237778623f5a2b13f91f (patch)
treedc85af4abdc3c5cc1942d26911ecf1ca2d3f9a63 /src/math.hpp
parent87559f480badc2be26279bd1822980e7ce5dbba5 (diff)
Distort the tile grid when rendering.
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);