Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static double round(double value, int places) {
- double placePower = POW_TABLE[places];
- int intValue = (int) value;
- return intValue + (int) (placePower * (value - intValue)) / placePower;
- }
Advertisement
Add Comment
Please, Sign In to add comment