def nonempty

stelliferous@0.0.2.0 · tensor_band_window.bend:29

import stelliferous@0.0.2.0/tensor_band_window.bend as TensorBandWindow
import Base

29def nonempty(active: Bool,window: RowWindow) -> RowWindow:
30  match active window:
31    case True{} window: window
32    case False{} RowWindow{output,Rows{above_first,above_count},Rows{below_first,below_count},Rows{window_first,window_count}}:
33      RowWindow{output,Rows{above_first,0},Rows{below_first,0},Rows{window_first,0}}

Uses (3)

Used by (1)