Created
December 2, 2013 09:13
-
-
Save ofZach/7746935 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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