def filter.convolution.index
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
4658def filter.convolution.index(+n: F32, +low: F32, +high: F32, edge: U32) -> F32:
4659 +length = U.max((high - low : F32), 1.0)
4660 U.choose(F32, U32.is_eq(edge, 1), (low + (n - low) - F32.floor(((n - low) / length : F32)) * length : F32), U.clamp(n, low, (high - 1.0 : F32)))