Pretty simple request:
llClamp(integer val, integer min, integer max)