round() 函数把一个数字舍入为最接近的整数。
n = Float.round(x)
var a = Float.round(3.5); var b = Float.round(3.4);
a = 4 b = 3
微信小程序
微信扫一扫体验
微信公众账号
微信扫一扫加关注
发表评论 取消回复