Visgraph.penetrable.points: def of bend-visgraph@2.0.0.0 Import: import bend-visgraph@2.0.0.0/visgraph.bend as Visgraph Lines 582-595 of bend-visgraph@2.0.0.0/visgraph.bend: https://jend.leeeet.dev/read.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&start_line=582&end_line=595 import Base # The points of `ys` and `xs` from index `i` down to 0, onto `acc`; `yr` # and `xr` hold y and x at `i`, and x is the index if `index` says so. The # last read, at index -1, wraps around. def penetrable.points(count: Nat, +i: U32, yr: Array & F32, xr: Array & F32, +index: Bool, acc: Pts) -> Pts: match count: case 0n: (ys, y) = yr (xs, x) = xr acc case 1n+c: (ys, +y) = yr (xs, +x) = xr +i2 = (i - 1 : U32) penetrable.points(c, i2, Array.get(F32, ys, i2), Array.get(F32, xs, i2), index, PCon{i, pick(index, U32.to_f32(i), x), y, acc}) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_f32 https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=Pts https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=pick