def clamp

cswap-bend-cli@0.1.0.0 · settings.bend:217

import cswap-bend-cli@0.1.0.0/settings.bend as Settings
import Base

217# min(max(v, lo), hi)
218def clamp(+v: Dec, +lo: Dec, +hi: Dec) -> Dec:
219  clamp.pick(below(v, lo), above(v, hi), v, lo, hi)

Uses (4)

Used by (2)