def span.events
import gralha-coverage@0.1.0.1/cover.bend as Coverimport Base
346# Events of the span [xa, xb) when it is inside; both ends lie within [0, width].
347def span.events(inside: Bool, +xa: F32, +xb: F32, +w: F32, acc: List<&2, CovEv>) -> List<&2, CovEv>:
348 match inside:
349 case False{}: acc
350 case True{}:
351 +ia = F32.to_u32(F32.floor(xa))
352 +ib = F32.to_u32(F32.floor(xb))
353 span.events.cells(U32.is_ge(ia, ib), ia, ib, xa, xb, w, acc)