1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-25 22:53:19 +00:00

TAU and other constants are now declared as constexpr

This commit is contained in:
Zeno Rogue 2023-01-30 15:37:03 +01:00
parent 9ce2a90c33
commit 0b11c9388b

View File

@ -19,10 +19,10 @@ namespace hr {
#endif
static constexpr ld A_PI = M_PI;
static const ld TAU = 2 * A_PI;
static const ld degree = A_PI / 180;
static const ld golden_phi = (sqrt(5)+1)/2;
static const ld log_golden_phi = log(golden_phi);
static constexpr ld TAU = 2 * A_PI;
static constexpr ld degree = A_PI / 180;
static constexpr ld golden_phi = (sqrt(5)+1)/2;
static constexpr ld log_golden_phi = log(golden_phi);
constexpr ld operator"" _deg(long double deg) { return deg * A_PI / 180; }
#endif