From e9c9d5a883e819e7799e630a883917ce4c69b41a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 19 Sep 2024 19:53:08 +0100 Subject: Add new mathematical constants to lib --- lib/maths.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/maths.h') 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()}; constexpr auto quarter_pi {half_pi / 2}; constexpr auto pi {glm::pi()}; constexpr auto two_pi {glm::two_pi()}; +constexpr auto degreesToRads = pi / 180.F; + +constexpr auto earthMeanRadius = 6371.01F; // In km +constexpr auto astronomicalUnit = 149597890.F; // In km template constexpr inline GlobalPosition -- cgit v1.2.3