Math.min(Math.max(num, min), max)
I find that the fact that the functions min and max have the same name as the variables min and max increases cognitive load which makes it harder to think about it.I find the following easier to read :  Math.min(Math.max(num, lower_bound), upper_bound)