mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-29 08:52:19 +00:00
tau can be now used in formulas
This commit is contained in:
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.;
|
||||||
|
Reference in New Issue
Block a user