-1 loop per iteration by only asserting paren () balance when () exist in the mathConf
This commit is contained in:
parent
e01097b1e3
commit
c58ebcc9f9
|
@ -45,7 +45,7 @@ export const tokenizeMath = (
|
|||
loggingEnabled && log(LT.LOG, `Split roll into mathConf ${JSON.stringify(mathConf)}`);
|
||||
|
||||
// Verify balanced parens before doing anything
|
||||
assertParenBalance(mathConf);
|
||||
if (mathConf.includes('(') || mathConf.includes(')')) assertParenBalance(mathConf);
|
||||
|
||||
// Evaluate all rolls into stepSolve format and all numbers into floats
|
||||
for (let i = 0; i < mathConf.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue