summaryrefslogtreecommitdiff
path: root/lib/maths.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-10-24 03:10:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-10-24 03:10:10 +0100
commit0889f3f6d7b96c6f6d186ca8fa7f4e9e0ec9c701 (patch)
tree987c196297c9be79dfc78875952965c4af2ebc28 /lib/maths.h
parentMerge branch 'billboard-shadows' (diff)
downloadilt-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.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;
+}