diff options
Diffstat (limited to 'lib/maths.h')
-rw-r--r-- | lib/maths.h | 6 |
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; +} |