def blocked_natural

bend-visgraph@2.0.0.0 · visgraph.bend:645

import bend-visgraph@2.0.0.0/visgraph.bend as Visgraph
import Base

645# How many tops a natural edge with slope `s` does not clear, as ts2vg's
646# num_penetrations weight.
647def blocked_natural(ts: Tops, +s: F32, +t: F32, +n: F32) -> F32:
648  match ts:
649    case TNil{}:
650      n
651    case TCon{v, next}:
652      blocked_natural(next, s, t, pick(greater(s, v, t), n, F32.add(n, 1.0)))

Uses (5)

Used by (1)