summaryrefslogtreecommitdiff
path: root/generic/lib/shared/clamp.inc
blob: ed49b8e8fd528b1648f770ccff379929ef2621f8 (plain)
1
2
3
_CLC_OVERLOAD _CLC_DEF GENTYPE clamp(GENTYPE x, GENTYPE y, GENTYPE z) {
  return (x > z ? z : (x < y ? y : x));
}