com.xiaoleilu.hutool
类 MathUtil
java.lang.Object
com.xiaoleilu.hutool.MathUtil
public class MathUtil
- extends Object
|
方法摘要 |
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.