[Python-ideas] Consider adding clip or clamp function to math

Serhiy Storchaka storchaka at gmail.com
Wed Aug 3 07:11:25 EDT 2016


On 03.08.16 02:23, Greg Ewing wrote:
> So in summary, I think it should be:
>
> clamp(NaN, y, z) --> NaN
> clamp(x, NaN, z) --> NaN
> clamp(x, y, NaN) --> NaN
> clamp(x, y, z) --> NaN if z < y

What about clamp(NaN, y, y)?




More information about the Python-ideas mailing list