标题: 请教round()函数 [打印本页] 作者: shiyiming 时间: 2012-5-25 21:24 标题: 请教round()函数 ROUND (argument <,rounding-unit>)
The ROUND function rounds the first argument to a value that is very close to a multiple of the second argument.
不懂这个multiple是什么。
rounding-unit 是 1 0.1 0.01 等等结果都感觉合理,但是0.2 0.3 等等时候就不懂了
运行下面代码:
round(5.11,0.2); /* 5.2 */
round(5.22,0.2); /* 5.2 */
round(5.33,0.2); /* 5.4 */
round(5.88,0.2); /* 5.8 */