Subtracts the second value from the first and stores the difference in the left-hand-side variable, wrapping any overflow.
- Xcode 10.0+
- Swift Standard Library
A numeric value.
The value to subtract from
The masking subtraction assignment operator (
&-=) silently wraps any overflow that occurs during the operation. In the following example, the difference of
21 is less than zero, the minimum representable
UInt value, so the result is the result is the partial value after discarding the overflowing bits.