Skip to content

Instantly share code, notes, and snippets.

@daynebatten
Created March 21, 2016 18:36
Show Gist options
  • Save daynebatten/18d1ec9957941884d326 to your computer and use it in GitHub Desktop.
Save daynebatten/18d1ec9957941884d326 to your computer and use it in GitHub Desktop.
if (fileBroken) {
return 1.0f;
} else if (start == end) {
return 0.0f;
} else {
return Math.min(1.0f, (getFilePosition() - start) / (float)(end - start));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment