Clamp sample data to min and max values.