From 0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 24 Oct 2024 03:10:08 +0100 Subject: Improve sun illumination based on angular size and astronomical twilight --- lib/maths.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/maths.h') 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(degrees) * degreesToRads; +} -- cgit v1.2.3