From #Modular Arithmetic, \(b\) is a residue of \(a \mod n\) as it could be written in \(a = qn + b\). Finding the next in line residue is by choosing the smallest positive remainder from the equation as residue. Such process is similar to the following example:
$$ -12 \mod 7 \equiv -5 \mod 7 \equiv 2 \mod 7 \equiv 9 \mod 7 $$
You will notice that from the above example, the next in line residue could be found by \(a - n\) (in this case, \(9 - 7\), which become \(2\)) or \(a + n\) (\(-12 + 7 = 5\)).