That's not in the bug in the sense that it results in incorrect behavior. Minor quibble aside - you are right that it does not belong. It's left over from a previous revisions. The original version I had was much closer to
's code which does not precalulate stop values and ends up spinning cycles doing math every iteration. Next I reversed the array so the index could be used to determine stop value with less math. This was unfortunate because I still had to do
reverse the return. Finally, I realized I could precalulate the stop values but didn't do a good job of cleaning up my false starts.