@lazyglobal off.

function Bound {
  parameter minB.
  parameter maxB.
  parameter value.

  return min(max(value, minB), maxB).
}