I was wondering how to properly (or correctly if only one correct definition exists) define the $clip(x,min\_value, max\_value)$ function, which clips $x$ to the range $[min\_value, max\_value]$.
For convenience, take $f(\cdot) = clip(\cdot)$, $a = min\_value$, and $b = max\_value$. I am considering two candidate definitions:
1:
$f(\cdot) = \left\{\begin{matrix} a\ \text{if}\ x \leq a\\ b\ \text{if}\ x \geq b\\ x\ \text{else} \end{matrix}\right.$
or 2:
$f(\cdot) = \left\{\begin{matrix} a\ \text{if}\ x < a\\ b\ \text{if}\ x > b\\ x\ \text{else} \end{matrix}\right.$
Hence, as I see it, the important detail here is whether to use the $\leq$ and $\geq$ operators or the $<$ and $>$ operators alternatively.
I am wondering which of the two versions above is correct/preferred and if there is any paper I can cite for its definition. The difference might seem trivial at first glance, but it of course has implications for defining the derivative of the function in the next step.