From 35d1fd8293cc124032a9860e5be31a3a5e9ccc9d Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Mon, 15 Nov 2021 11:38:15 +0100 Subject: [PATCH] improved constant value types --- Eule/Constants.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Eule/Constants.h b/Eule/Constants.h index aab055b..0fc2462 100644 --- a/Eule/Constants.h +++ b/Eule/Constants.h @@ -3,13 +3,13 @@ // Pretty sure the compiler will optimize these calculations out... //! Pi up to 50 decimal places -#define PI 3.14159265358979323846264338327950288419716939937510 +static constexpr double PI = 3.14159265358979323846264338327950288419716939937510; //! Pi divided by two -#define HALF_PI 1.57079632679489661923132169163975144209858469968755 +static constexpr double HALF_PI = 1.57079632679489661923132169163975144209858469968755; //! Factor to convert degrees to radians -#define Deg2Rad 0.0174532925199432957692369076848861271344287188854172222222222222 +static constexpr double Deg2Rad = 0.0174532925199432957692369076848861271344287188854172222222222222; //! Factor to convert radians to degrees -#define Rad2Deg 57.295779513082320876798154814105170332405472466564427711013084788 +static constexpr double Rad2Deg = 57.295779513082320876798154814105170332405472466564427711013084788;