1 2 3 4 5 6 7 | public static double RoundDigit(double number, int n){ double tmpNumber = number * Math.pow(10, n); int vl = (int)((tmpNumber - (int)tmpNumber)*10); int resul = (int)tmpNumber; if(vl>=5){ resul++; } return resul/Math.pow(10, n); } |
RUBY ROSE - RWBY |
0 Nhận xét