Lua:小数精度计算,几位数判断,四舍五入,最靠近5倍数取整
摘要:
math.modf 当我们调用该函数时,该函数返回两个值,第一个值是数字的整数值,第二个返回值是数字的小数值(如果有的话) math.floor 向下取整 ua 中的math.floor函数是向下取整函数。 math.floor(5.123) – 5 math.floor(5.523) – 5 用此 阅读全文
posted @ 2022-08-16 00:34 luoyikun 阅读(115) 评论(0) 推荐(0)