Move the seeded randomness and the {seq()} counters into internal/drawstate

This commit is contained in:
2026-10-05 11:43:45 +02:00
committed by Lillem4n
parent 4a680f03b3
commit 2d9c315e75
14 changed files with 107 additions and 76 deletions
+3 -1
View File
@@ -7,6 +7,8 @@ import (
"strconv"
"strings"
"unicode"
"github.com/larvit/fejkdata/internal/drawstate"
)
// calcNode is a parsed expression node. It evaluates over the operand values expand
@@ -235,7 +237,7 @@ func calcPrep(args []string) callFn {
}
placed := indexVars(expr, at)
dp := calcDecimals(args)
return func(_ *generatorState, _ string, operands []string) string {
return func(_ *drawstate.State, _ string, operands []string) string {
return formatFloat(placed.eval(operands), dp)
}
}