: constrain ( n a b -- n ) 2dup > [ swap ] when rot min max ;