diff options
Diffstat (limited to 'lib/maths.h')
-rw-r--r-- | lib/maths.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/maths.h b/lib/maths.h index 2049c78..43d6dcd 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -317,7 +317,7 @@ template<Arithmetic R = float, Arithmetic Ta, Arithmetic Tb> constexpr auto ratio(const Ta valueA, const Tb valueB) { - using Common = std::common_type_t<Ta, Ta>; + using Common = std::common_type_t<Ta, Ta, R>; return static_cast<R>((static_cast<Common>(valueA) / static_cast<Common>(valueB))); } @@ -504,11 +504,11 @@ 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); +float operator""_mph(const long double v); +float operator""_kph(const long double v); constexpr float -operator"" _degrees(long double degrees) +operator""_degrees(long double degrees) { return static_cast<float>(degrees) * degreesToRads; } |