Skip to content

Instantly share code, notes, and snippets.

Created Dec 2, 2013
What would you like to do?
// was noticing sin(ofGetElapsedTimef()) gets crunchy at some point, because of lower resolution in sin / cos. here's an alternative function that seems to help... not tested for speed.
float ofGetElapsedTimeForSin(){
long long timeNow = ofGetElapsedTimeMillis();
long long modForTwoPi = (int)(TWO_PI*1000.0);
return ((float)(timeNow % modeForTwoPi)/1000.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment