Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Skipping a single number in a for loop

$
0
0

for(i = 0 ; i < 12 ; i++){
    if (i == 7 || i == 9) {
        continue; // Goes to the next iteration.
    }
    else 
    {
        ofSetColor(200);
        ofCircle(blackLocX[i], blackLocY[i], pieceR);

    }
}

... that said, there is probably a more flexible way to do whatever it is you're doing :smile:


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>