Skip to content

Instantly share code, notes, and snippets.

@hackerain
Last active December 17, 2015 00:19
Show Gist options
  • Save hackerain/5520274 to your computer and use it in GitHub Desktop.
Save hackerain/5520274 to your computer and use it in GitHub Desktop.
Round up the value to 50 integer time
a = (a+50-int(a)%50);
For example:
before after
a=1 --> a=50
a=49 --> a=50
a=51 --> a=100
a=99 --> a=100
a=101 --> a=150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment