def clamped_stop
import bendtorch-core@0.1.0.0/src/tensor/slice_LAWS.bend as SliceLAWSimport Base
129# The stop after the clamp: the clamped stop, or the clamped start where the
130# clamped stop falls before it, so the axis is empty.
131def clamped_stop(+start: Nat, +stop: Nat, +extent: Nat) -> Nat:
132 Bool.pick(Nat, Nat.is_le(clamp(start, extent), clamp(stop, extent)), clamp(stop, extent), clamp(start, extent))