3 ms·
That is probably (x + 1) % 10 assuming x is non-negative. That kind of code is responsible for quite a bit of the verbosity, the author was obviously not aware
by danbruc 9y ago
That is probably (x + 1) % 10 assuming x is non-negative. That kind of code is responsible for quite a bit of the verbosity, the author was obviously not aware of many of the little tricks usually used in this kind of code.
- baddox 9y agoAlso assuming that x <= 9.
- raxod502 9y agoOriginal author here. It's actually a method to convert from the index of an inventory hotkey slot into the keystroke used to access it -- there were ten hotkey slots, which were numbered 1–9 and 0 at the end. But I like all the other interesting interpretations here :P (They all assume way more knowledge than I had at the time.)