Clamp

Write a function that takes a number and returns it clamped between a minimum and maximum value.