mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-06-04 09:03:50 -04:00
-1 loop per iteration by only asserting paren () balance when () exist in the mathConf
This commit is contained in:
@@ -45,7 +45,7 @@ export const tokenizeMath = (
|
|||||||
loggingEnabled && log(LT.LOG, `Split roll into mathConf ${JSON.stringify(mathConf)}`);
|
loggingEnabled && log(LT.LOG, `Split roll into mathConf ${JSON.stringify(mathConf)}`);
|
||||||
|
|
||||||
// Verify balanced parens before doing anything
|
// 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
|
// Evaluate all rolls into stepSolve format and all numbers into floats
|
||||||
for (let i = 0; i < mathConf.length; i++) {
|
for (let i = 0; i < mathConf.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user