summaryrefslogtreecommitdiff
path: root/src/math.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-03-28 14:17:47 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-03-28 14:17:47 +0200
commit6966908022e36df9fb4c5e2233603a6fef18e97d (patch)
tree1540097e60001636cbe752d8fb1e459f45081e41 /src/math.hpp
parentaa4731d2e1305ea4fb6d59032026bf1ce6f2b65d (diff)
Pie menu; start redoing shooting mechanics.
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 e0b8f1b..dc077e1 100644
--- a/src/math.hpp
+++ b/src/math.hpp
@@ -254,6 +254,11 @@ public:
return *this / len();
}
+ static vec_t<float, 2> rad(float t)
+ {
+ return vec_t<float, 2>(cos(t), sin(t));
+ }
+
// Compatibility with SFML
template <typename U>