: constrain ( n a b -- n ) 2dup > [ swap ] when rot min max ;
order of a and b doesn't matter now.
Done