1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

new parser function: sqrt

This commit is contained in:
Zeno Rogue 2019-12-23 21:49:37 +01:00
parent 4144c2b928
commit 8aede89c24

View File

@ -197,6 +197,7 @@ cld exp_parser::parse(int prio) {
else if(eat("asinh(")) res = asinh(parsepar());
else if(eat("acosh(")) res = acosh(parsepar());
else if(eat("exp(")) res = exp(parsepar());
else if(eat("sqrt(")) res = sqrt(parsepar());
else if(eat("log(")) res = log(parsepar());
else if(eat("tan(")) res = tan(parsepar());
else if(eat("tanh(")) res = tanh(parsepar());
@ -307,7 +308,7 @@ EX ld parseld(const string& s) {
EX string parser_help() {
return XLAT("Functions available: %1",
"(a)sin(h), (a)cos(h), (a)tan(h), exp, log, abs, re, im, conj, let(t=...,...t...), floor, frac, e, i, pi, s, ms, mousex, mousey, mousez, shot [1 if taking screenshot/animation], to01, random, ifp(a,v,w) [if positive]");
"(a)sin(h), (a)cos(h), (a)tan(h), exp, log, abs, re, im, conj, let(t=...,...t...), floor, frac, e, i, pi, s, ms, mousex, mousey, mousez, shot [1 if taking screenshot/animation], sqrt, to01, random, ifp(a,v,w) [if positive]");
}
}