标签:sum new logs eval class stat utils return ima
public class DoubleUtils {
/**
* 多个double的值相加
* @param v1
* @param v2
* @return
*/
public static Double add(Double... v1) {
double sum= 0;
for (Double double1 : v1) {
BigDecimal b1 = new BigDecimal(double1.toString());
BigDecimal b2 = new BigDecimal(Double.toString(sum));
sum=b1.add(b2).doubleValue();
}
return sum;
}
}
标签:sum new logs eval class stat utils return ima
原文地址:http://www.cnblogs.com/AngeLeyes/p/7843433.html