mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 18:30:34 +00:00
tau can be now used in formulas
This commit is contained in:
parent
4d57041c9f
commit
96be05484a
1
util.cpp
1
util.cpp
@ -381,6 +381,7 @@ cld exp_parser::parse(int prio) {
|
|||||||
else if(number == "i") res = cld(0, 1);
|
else if(number == "i") res = cld(0, 1);
|
||||||
else if(number == "inf") res = HUGE_VAL;
|
else if(number == "inf") res = HUGE_VAL;
|
||||||
else if(number == "p" || number == "pi") res = M_PI;
|
else if(number == "p" || number == "pi") res = M_PI;
|
||||||
|
else if(number == "tau") res = TAU;
|
||||||
else if(number == "" && next() == '-') { at++; res = -parse(20); }
|
else if(number == "" && next() == '-') { at++; res = -parse(20); }
|
||||||
else if(number == "") throw hr_parse_exception("number missing, " + where());
|
else if(number == "") throw hr_parse_exception("number missing, " + where());
|
||||||
else if(number == "s") res = ticks / 1000.;
|
else if(number == "s") res = ticks / 1000.;
|
||||||
|
Loading…
Reference in New Issue
Block a user