A very common use of modulo in Processing is to perform an action every nth frame.
So, if I wanted to do something every 7 frames:
int step = 7;
void draw(){
if(frameCount%step == 0){
print(frameCount, " ");
}
}
A very common use of modulo in Processing is to perform an action every nth frame.
So, if I wanted to do something every 7 frames:
int step = 7;
void draw(){
if(frameCount%step == 0){
print(frameCount, " ");
}
}