Can someone explain the logic behind this?
The way it should:
5 / 2 = 2.5 (2)
5 / 7 = 0.714285 (0)
5 / -6 = −0.8333 (-1 is the integer below -0.833333)
5 / -2 = −2.5 (-3)
5 / -3 = −1.6666 (-2)
It's a basic floor. It divides it, and then makes it the integer below.