1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 10:00:42 +00:00

phi cannot be constexpr on some compilers

This commit is contained in:
Zeno Rogue 2023-02-05 11:37:04 +01:00
parent 9fd7d94af2
commit 60c041e397

View File

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