com.xiaoleilu.hutool
类 MathUtil

java.lang.Object
  继承者 com.xiaoleilu.hutool.MathUtil

public class MathUtil
extends Object


构造方法摘要
MathUtil()
           
 
方法摘要
static double round(double number, int digit)
          保留小数位
static String roundStr(double number, int digit)
          保留小数位
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

MathUtil

public MathUtil()
方法详细信息

roundStr

public static String roundStr(double number,
                              int digit)
保留小数位

参数:
number - 被保留小数的数字
digit - 保留的小数位数
返回:
保留小数后的字符串

round

public static double round(double number,
                           int digit)
保留小数位

参数:
number - 被保留小数的数字
digit - 保留的小数位数
返回:
保留小数后的字符串


Copyright © 2014. All rights reserved.