summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/maths.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/maths.h b/lib/maths.h
index 90ddb69..14a29d1 100644
--- a/lib/maths.h
+++ b/lib/maths.h
@@ -422,3 +422,9 @@ kph_to_ms(T v)
// ... literals are handy for now, probably go away when we load stuff externally
float operator"" _mph(const long double v);
float operator"" _kph(const long double v);
+
+constexpr float
+operator"" _degrees(long double degrees)
+{
+ return static_cast<float>(degrees) * degreesToRads;
+}