摘要: lua math.floor 实现四舍五入: lua 中的math.floor函数是向下取整函数。 math.floor(5.123) -- 5 math.floor(5.523) -- 5 用此特性实现四舍五入 math.floor(5.123 + 0.5) -- 5 math.floor(5.5 阅读全文
posted @ 2016-05-14 21:41 mr_yu 阅读(20032) 评论(0) 推荐(0) 编辑