@JDeut wrote:
I’m working on a bit of code to make something happen every couple of seconds.
The idea was something like this:if (ofGetElapsedTimef() % 8) {
printf(“ok, it’s working”);
}But this throws an error about floats - maybe having something to do with floating-point resolution in C++. So, I end up trying:
if (fmod(ofGetElapsedTimef(), 8)){
printf(“ok, it’s working”);
}And this does not work like expected.
Any thoughts on how to do this and why this approach isn’t working?
Posts: 2
Participants: 2