Visgraph.weight: def of bend-visgraph@2.0.0.0 Import: import bend-visgraph@2.0.0.0/visgraph.bend as Visgraph Lines 112-137 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=112&end_line=137 import Base def weight(+k: Weight, +x1: F32, +x2: F32, +y1: F32, +y2: F32, +s: F32) -> F32: match k: case Unweighted{}: 0.0 case Distance{}: F32.sqrt(sq_distance(x1, x2, y1, y2)) case SqDistance{}: sq_distance(x1, x2, y1, y2) case VDistance{}: F32.sub(y2, y1) case AbsVDistance{}: F32.abs(F32.sub(y2, y1)) case HDistance{}: F32.sub(x2, x1) case AbsHDistance{}: F32.abs(F32.sub(x2, x1)) case Slope{}: known_slope(s, x1, x2, y1, y2) case AbsSlope{}: F32.abs(known_slope(s, x1, x2, y1, y2)) case Angle{}: F32.atan(known_slope(s, x1, x2, y1, y2)) case AbsAngle{}: F32.atan(F32.abs(known_slope(s, x1, x2, y1, y2))) case NumPenetrations{}: 0.0 Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.abs https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.atan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sqrt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=Weight https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=known_slope https://jend.leeeet.dev/definition.txt?path=bend-visgraph@2.0.0.0/visgraph.bend&name=sq_distance