WIP components (as built)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 15:43:43 -04:00
1 parent c236ea7ece
commit 33e924f2b1
98 files changed
+2746 -1204

No files matched your search

+12
View File
@@ -204,3 +204,15 @@ func chartRuns(vals []float64, x func(i int) float32, f func(idx []int)) {
i = j
}
}
func chartVisibleIndices(n, limit, active int) []int {
step := max(1, (n+limit-1)/limit)
out := make([]int, 0, min(n, limit+1))
for i := 0; i < n; i += step {
out = append(out, i)
}
if active >= 0 && active < n && active%step != 0 {
out = append(out, active)
}
return out
}