Rotate() angles behaviour inside FOR or IF
in
Programming Questions
•
5 months ago
Guys, I was coding a simple exercise, and I don't know why rotate angles works fine using if statements, but not inside FOR loop.
// with IF
void draw() {
translate(width/2, height/2);
if (i<180) {
rotate(radians(i));
ellipse(0, 0, 350, 120);
}
else noLoop();
i+=10;
}
// with FOR
translate(width/2, height/2);
for (int i=0; i < 180; i+=1) {
rotate(radians(i));
ellipse(0, 0, 350, 120);
}
I might be missing something
1