top | item 46675774 (no title) ludwik | 1 month ago Shouldn't the code say: position = (position + direction + 1) % 12; Or have I misunderstood something? discuss order hn newest LiamPowell|1 month ago The +12 is to keep the number positive. The direction contains the movement so a +1 wouldn't make sense. nulptr|1 month ago The +12 there is so that % works correctly (ie the number never becomes negative)
LiamPowell|1 month ago The +12 is to keep the number positive. The direction contains the movement so a +1 wouldn't make sense.
LiamPowell|1 month ago
nulptr|1 month ago