Last active
December 17, 2015 00:19
-
-
Save hackerain/5520274 to your computer and use it in GitHub Desktop.
Round up the value to 50 integer time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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