Cover.tree.at: def of gralha-coverage@0.1.0.1 Import: import gralha-coverage@0.1.0.1/cover.bend as Cover Lines 56-65 of gralha-coverage@0.1.0.1/cover.bend: https://jend.leeeet.dev/read.txt?path=gralha-coverage@0.1.0.1/cover.bend&start_line=56&end_line=65 import Base import gralha-text-scan@0.1.0.1/scan.bend as U def tree.at(t: CovTree, +half: U32, +x: U32, +y: U32) -> F32: match t: case CovFlat{v}: v case CovQuad{a, b, c, d}: +left = U32.is_lt(x, half) +top = U32.is_lt(y, half) +xx = U.choose(U32, left, x, (x - half : U32)) +yy = U.choose(U32, top, y, (y - half : U32)) +next = U32.div(half, 2) tree.at(U.choose(CovTree, top, U.choose(CovTree, left, a, b), U.choose(CovTree, left, c, d)), next, xx, yy) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=gralha-coverage@0.1.0.1/cover.bend&name=CovTree https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose