Created
December 30, 2015 17:30
-
-
Save 1024jp/f007aae78c2e55f9106c to your computer and use it in GitHub Desktop.
round to the nearest 0.5
This file contains 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
double swedishRound(double number) { return round(2.0 * number) / 2.0; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment