四舍五入并保留一位小数

double myround( double f )
 {
      long templ = Math.round( f * 10 );
      double retd = templ / 10.0;
      return retd;
 }

猜你喜欢

转载自284772894.iteye.com/blog/1810982