summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-09-19 19:53:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-09-19 19:53:08 +0100
commite9c9d5a883e819e7799e630a883917ce4c69b41a (patch)
tree28b778f194e4304542617efe373a8d99a271ae6e /lib
parentInitial commit of code for calculating sun position (diff)
downloadilt-e9c9d5a883e819e7799e630a883917ce4c69b41a.tar.bz2
ilt-e9c9d5a883e819e7799e630a883917ce4c69b41a.tar.xz
ilt-e9c9d5a883e819e7799e630a883917ce4c69b41a.zip
Add new mathematical constants to lib
Diffstat (limited to 'lib')
-rw-r--r--lib/maths.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/maths.h b/lib/maths.h
index 018ef0e..3127d3c 100644
--- a/lib/maths.h
+++ b/lib/maths.h
@@ -42,6 +42,10 @@ constexpr auto half_pi {glm::half_pi<float>()};
constexpr auto quarter_pi {half_pi / 2};
constexpr auto pi {glm::pi<float>()};
constexpr auto two_pi {glm::two_pi<float>()};
+constexpr auto degreesToRads = pi / 180.F;
+
+constexpr auto earthMeanRadius = 6371.01F; // In km
+constexpr auto astronomicalUnit = 149597890.F; // In km
template<glm::length_t D>
constexpr inline GlobalPosition<D>