Normally, what is meant is clamping to the minimum/maximum values of the data type instead of allowing it to overflow.
True, but in any case the result isn't right.
Type: Posts; User: brewbuck
Normally, what is meant is clamping to the minimum/maximum values of the data type instead of allowing it to overflow.
True, but in any case the result isn't right.
Well, given that the above line of code doesn't actually include the word "return" in it, I wouldn't be surprised by ANY particular value it happened to return. In fact, I'm particularly unsurprised...