有谁知道 Excel 中是否有 round.max 函数,但是在 JavaScript 中。
Tnx。
最佳答案
编辑。如果您想指定精度,请应用一些基本数学:
function roundup(x, digits) {
var m=Math.pow(10, digits);
return Math.ceil(x*m)/m;
}
<小时/>
另请参阅:Math.round()
, Math.floor()
如果“round.max”是指ROUND(MAX())
,那么您需要 Math.max()
:
Math.max(x, y, z, ...)
Math.max.apply(null, someArray)
关于javascript - 如何在 JavaScript 中实现 round.max 的出色表现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4272304/