Skip to content

Instantly share code, notes, and snippets.

@brecert
Created September 30, 2023 04:05
Show Gist options
  • Save brecert/5f2c2facd018befe621268813896afdd to your computer and use it in GitHub Desktop.
Save brecert/5f2c2facd018befe621268813896afdd to your computer and use it in GitHub Desktop.
float round(float n) {
return floor(n) + step(-0.5, n - ceil(n));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment