-
double d1 = 3.14;
-
double d2 = 3.49;
-
double d3 = 3.5;
-
double d4 = 3.51;
-
double d5 = -3.14;
-
double d6 = -3.49;
-
double d7 = -3.5;
-
double d8 = -3.51;
-
com.orhanobut.logger.Logger.e(Math.round(d1) + "");//3
com.orhanobut.logger.Logger.e(Math.round(d2) + "");//3
com.orhanobut.logger.Logger.e(Math.round(d3) + "");//4
com.orhanobut.logger.Logger.e(Math.round(d4) + "");//4 -
com.orhanobut.logger.Logger.e(Math.round(d5) + "");//-3
com.orhanobut.logger.Logger.e(Math.round(d6) + "");//-3
com.orhanobut.logger.Logger.e(Math.round(d7) + "");//-3
com.orhanobut.logger.Logger.e(Math.round(d8) + "");//-4 -
总结:
图片.png
网友评论