BendTensors.Vec4.min_upto: def of bend-tensors@0.0.0.2 Import: import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors Lines 349-359 of bend-tensors@0.0.0.2/bend_tensors.bend: https://jend.leeeet.dev/read.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&start_line=349&end_line=359 import Base # the smallest of the first k elements def Vec4.min_upto(k: Nat, v: Vec4) -> F32: match k v: case 1n Vec4{x0, x1, x2, x3}: x0 case 2n Vec4{x0, x1, x2, x3}: F32.min(x0, x1) case 3n Vec4{x0, x1, x2, x3}: F32.min(F32.min(x0, x1), x2) case _ v2: Vec4.min(v2) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.min https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Vec4 https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Vec4.min