How does that work ... It clearly does but I am at a loss to understand it.
I get the 5 - (-5) part but I don't understand how the functionally equivalent part works.
Can you explain?
Is there a name for this behaviour?
I can see it also works for int's the reference mentions it and I tested it.
however when I tested a byte it rolled from 255 to 0 just fine but the maths doesn't work the same way as above.
5 - 250 is -245 which is what a normal calculation would tell you.
Why the difference?