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 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>