the trick here is that % (in WGSL and most languages) has a range from -b to b, and so by adding exactly b and taking the remainder again, you can end up strictly positive ...