Whats the best type of loop?

Circuit, minus 1 (because otherwise we end up hitting the wrong tripping points… basically, we need to 0-index the circuit numbers), divided by the number of columns, floored, is “What row am I on (zero-indexed)?”
circuit = 5, columns = 2, floor(4/2) = 2-th row. (12/34/56)
Each row in the picture is on a leg, so we take the row number, modulo the number of legs. That tells us what leg the row is on. We add 1 to make it 1-indexed because the legs were 1-indexed instead of 0-indexed. (Modulo, as you know, is a 0-indexed operation.)

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.