1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 23:47:40 +00:00

formula parser now understands complex numbers, and some extra functions including let(x=2, x*x)

This commit is contained in:
Zeno Rogue
2018-11-07 00:51:41 +01:00
parent 7e80be5a87
commit 55fdd25a6c
5 changed files with 63 additions and 31 deletions

View File

@@ -605,7 +605,7 @@ namespace dialog {
if(kind == 's') {
exp_parser ep;
ep.s = ne.s;
ld x = ep.parse();
ld x = real(ep.parse());
if(!ep.ok()) return;
if(ne.sc.positive && x <= 0) return;
*ne.editwhat = x;