fix macro algebra
This commit is contained in:
parent
b8afd5d243
commit
1b60290286
1 changed files with 3 additions and 3 deletions
|
|
@ -1230,9 +1230,9 @@
|
|||
function constOp(tok, consts, opch, op) {
|
||||
let pos, v1, v2;
|
||||
if ((pos = tok.indexOf(opch)) > 0) {
|
||||
v1 = consts[tok.substring(0,pos)] || 0;
|
||||
v2 = parseInt(tok.substring(pos+1)) || 0;
|
||||
return op(v1,v2);
|
||||
v1 = parseFloat(consts[tok.substring(0,pos)] || 0);
|
||||
v2 = parseFloat(tok.substring(pos+1)) || 0;
|
||||
return op(v1,v2).round(4);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue