Is there a “canonical” name for a function combining min() and max()?

后端 未结 8 2086
孤街浪徒
孤街浪徒 2021-02-18 13:03

I find that I frequently end up writing a function that I always call \"clamp()\", that is kind of a combination of min() and max(). Is t

相关标签:
8条回答
  • 2021-02-18 13:53

    median

    Because it generalizes to more values.

    0 讨论(0)
  • 2021-02-18 13:56

    We use pin here. Actually, we use pin for simple ranges and clamp for other stuff.

    0 讨论(0)
提交回复
热议问题