我试图将一个数字四舍五入到最接近的0.5.例如。
0.1 -> 0.5 0.5 -> 0.5 0.6 -> 1 1 -> 1
谢谢你!
我想明白了。return Math.ceil(num*2)/2;
return Math.ceil(num*2)/2;