def outline.steps
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
1442# Steps for an arc of `sweep` radians at radius r within the tolerance.
1443def outline.steps(+sweep: F32, +r: F32, +scale: F32) -> U32:
1444 +tol = outline.tolerance(scale)
1445 +step = U.max(0.001, (2.0 * F32.sqrt((2.0 * U.max(tol, 0.000001) / U.max(r, 0.000001) : F32)) : F32))
1446 F32.to_u32(U.min(4096.0, U.max(1.0, F32.ceil((F32.abs(sweep) / step : F32)))))