摘要:
function drawProgressNum(num, total) { var leftWidth = (num / total) * 100; //将百分比保留两位小数 var percentNum = (Math.round(leftWidth*100)/100).toFixed(2) + 阅读全文
posted @ 2017-10-12 13:46
Legolas_4
阅读(696)
评论(0)
推荐(0)
摘要:
方法3:最简单的方法 1. float a = 123.2334f; float b = (float)(Math.round(a*100))/100;(这里的100就是2位小数点,如果要其它位,如4位,这里两个100改成10000) 阅读全文
posted @ 2017-10-12 10:25
Legolas_4
阅读(3290)
评论(0)
推荐(0)

浙公网安备 33010602011771号