From 0df75589ca55facd0213abf2328d5e0471a9a800 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 27 May 2024 14:08:29 +0200 Subject: [PATCH] phi now available in formulas --- util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/util.cpp b/util.cpp index 07170cb5..118fd8b1 100644 --- a/util.cpp +++ b/util.cpp @@ -376,6 +376,7 @@ cld exp_parser::parse(int prio) { else if(number == "inf") res = HUGE_VAL; else if(number == "p" || number == "pi") res = M_PI; else if(number == "tau") res = TAU; + else if(number == "phi") res = (1 + sqrt(5)) / 2; else if(number == "" && next() == '-') { at++; res = -parse(20); } else if(number == "") throw hr_parse_exception("number missing, " + where()); else if(number == "s") res = ticks / 1000.;