News for hackers. Stuff that matters.
Re:Math.min(Math.max(num, min), max) by sarah180 on Thursday August 20, 2020 @12:43PM (#24225185)
At the risk of starting a style debate, this may be easier to read if you write it like an if-else:

    a > max ? max :
    a < min ? min :
              a
Re:Math.min(Math.max(num, min), max) by KMag on Thursday August 20, 2020 @01:26PM (#24225864)
Unless, of course, your language "designer" has no idea why every other language uses right-associative ternary operators.
Re:Math.min(Math.max(num, min), max) by bangonkeyboard on Thursday August 20, 2020 @02:46PM (#24226984)
This was a "fun" bug to track down in a PHP codebase.