Last active
August 29, 2015 14:19
-
-
Save 1lann/55bafa9785276434b5e2 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
double myRound(double num, int decimalPlaces) { | |
int rounded = num * power10Of(decimalPlaces); | |
return (double)rounded / power10Of(decimalPlaces); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment