def filter.window.samples

gralha-svg-render@0.1.0.1 · svg.bend:4782

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

4782def filter.window.samples(n: Nat, +i: U32, +aa: U32, +window: FilterWindow, +point: Point, +step: F32, acc: F32) -> F32:
4783  match n:
4784    case 0n: acc
4785    case 1n+d:
4786      filter.window.samples(d, U32.inc(i), aa, window, point, step,
4787        (acc + U.choose(F32, filter.window.inside(window, point.add(point, Point{((U32.to_f32(U32.mod(i, aa)) + 0.5) * step : F32), ((U32.to_f32(U32.div(i, aa)) + 0.5) * step : F32)})), 1.0, 0.0) : F32))

Uses (14)

Used by (1)