clamp / median / range

https://dotat.at/@/2025-07-02-cmp.html Here are a few tangentially-related ideas vaguely near the theme of comparison operators. comparison style Some languages such as BCPL, Icon, Python have chained comparison operators , like if min <= x <= max: ... In languages without chained comparison, I like to write comparisons as if they were chained, like, if min <= x && x <= max { // ... } A rule of…