Created
December 4, 2015 19:20
-
-
Save fiorix/e9849357f565ca092ee8 to your computer and use it in GitHub Desktop.
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
func RoundUp(v int) int { | |
return 10 * ((v + 9) / 10) | |
} | |
func RoundDown(v int) int { | |
return 10 * (v / 10) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment