def Int.sat

bend-kit-int@0.2.0.0 · int.bend:225

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

225def Int.sat(low: Bool, +n: Nat, s: Bool) -> Word(n):
226  match low:
227    case True{}:
228      Int.min(n, s)
229    case False{}:
230      Int.max(n, s)

Uses (5)

Used by (1)