News for hackers. Stuff that matters.
Re:Math.min(Math.max(num, min), max) by amichal on Thursday August 20, 2020 @04:36PM (#24228612)
Assuming we know (lower_bound <= upper_bound) I'd write:

Math.max(lower_bound, Math.min(num, upper_bound))

Since i read right to left.

Re:Math.min(Math.max(num, min), max) by biddlesby on Thursday August 20, 2020 @05:06PM (#24228982)
It’s amazing what a difference it makes when you just good names and formatting