From 60c041e397328f822e7242effd9155eced549b98 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 5 Feb 2023 11:37:04 +0100 Subject: [PATCH] phi cannot be constexpr on some compilers --- hyperpoint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index a7e3e980..48f22611 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -21,8 +21,8 @@ namespace hr { static constexpr ld A_PI = M_PI; 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); +static const ld golden_phi = (sqrt(5)+1)/2; +static const ld log_golden_phi = log(golden_phi); constexpr ld operator"" _deg(long double deg) { return deg * A_PI / 180; } #endif