diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-16 15:32:44 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-16 15:32:44 +0100 |
commit | a62ac36a7e401b39d760237778623f5a2b13f91f (patch) | |
tree | dc85af4abdc3c5cc1942d26911ecf1ca2d3f9a63 /src/math.hpp | |
parent | 87559f480badc2be26279bd1822980e7ce5dbba5 (diff) |
Distort the tile grid when rendering.
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); |