17 Dec
2015
17 Dec
'15
9:23 p.m.
On 17/12/2015 21:12, Robert Ramey wrote:
On 12/16/15 11:16 PM, David Stone wrote:
How difficult would it be to add in the ability to provide 'clamping' or 'saturation' behavior? If you go below the min, set the value to the min, and if you go above the max, set to the max.
I never considered this, and from what I know about the design of the library, I don't think it would be practical to implement on top of what I have now.
FWIW, in most cases where I have range concerns (mostly squeezing ints into smaller data types for protocol reasons), clamping is the behaviour that I want.