diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-24 03:10:08 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-10-24 03:10:10 +0100 |
commit | 0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701 (patch) | |
tree | 987c196297c9be79dfc78875952965c4af2ebc28 /lib/maths.h | |
parent | Merge branch 'billboard-shadows' (diff) | |
download | ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.tar.bz2 ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.tar.xz ilt-0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701.zip |
Improve sun illumination based on angular size and astronomical twilight
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; +} |