Hi,
For the modulus function, I’m fairly certain that it’s wrapping correctly, based on how the modulus function is normally defined.
This statement is true for the modulus, for two integers A and B.
(A/B) * B +(A%B) = A.
Assuming that’s true, then -1/10 = 0.
And (-1/10) * 10 + (A%B) = A
So (A%B) = -1 because (-1/10) * 10 with integers is 0.
Hope that helps.