1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 17:40:36 +00:00

phi now available in formulas

This commit is contained in:
Zeno Rogue 2024-05-27 14:08:29 +02:00
parent 358554d60e
commit 0df75589ca

View File

@ -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.;