Awesome, really helpful!
The way I more easily understand it, is with remainder, you stop at the first multiple that's below your value so -4 % 3 (as reminder), "how many 3s can we fit in -4" well -4 + 3 = -1, and since we can't fit another 3 in -1, we stop we thus get -1 with a reminder of -1, because -1 - (-1) = 0
In modulus, you go to the first multiple above your unsigned value, which would be 6, then subtract the signed value, so 6 - 4 = 2
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Awesome, really helpful!
The way I more easily understand it, is with remainder, you stop at the first multiple that's below your value so -4 % 3 (as reminder), "how many 3s can we fit in -4" well -4 + 3 = -1, and since we can't fit another 3 in -1, we stop we thus get -1 with a reminder of -1, because -1 - (-1) = 0
In modulus, you go to the first multiple above your unsigned value, which would be 6, then subtract the signed value, so 6 - 4 = 2