Skip to content

Instantly share code, notes, and snippets.

@tsraveling
Created December 14, 2018 21:34
Show Gist options
  • Save tsraveling/f30460649dd100ebba1ff63b1bd2b2c0 to your computer and use it in GitHub Desktop.
Save tsraveling/f30460649dd100ebba1ff63b1bd2b2c0 to your computer and use it in GitHub Desktop.
HowTo: Loop from 0 to 1 Using Float Increments #math
float interval = 1.0f;
totalTime += Time.delta;
float val = (totalTime / interval) % 1f;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment