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:
[ Parent
| on HN ]
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.