diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-09-19 19:53:08 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-09-19 19:53:08 +0100 |
commit | e9c9d5a883e819e7799e630a883917ce4c69b41a (patch) | |
tree | 28b778f194e4304542617efe373a8d99a271ae6e /lib | |
parent | Initial commit of code for calculating sun position (diff) | |
download | ilt-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.h | 4 |
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> |