Skip to content

Instantly share code, notes, and snippets.

@jingoro
Created October 5, 2011 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jingoro/1265352 to your computer and use it in GitHub Desktop.
Save jingoro/1265352 to your computer and use it in GitHub Desktop.
bc round to nearest integer
define round ( x ) {
auto origscale, result;
origscale = scale;
scale = 0
result = (x + 0.5) / 1;
scale = origscale;
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment