Lua math.fmod使用时的小数问题
时间:2021-01-28 10:26:06|栏目:|点击: 次
lua math.fmod使用注意小数: --Returns the remainder of the division of x by y. function math.fmod (x, y) end //取模运算 这里需要注意小数的问题,看下面两个例子: 1、 local x = math.fmod(15, 4) print(x) 结果:4 2、 local x = math.fmod(15.3, 4) print(x) 结果:3.3 3、 local x = math.fmod(15, 4.1) print(x) 结果:2.7
上一篇:折纸教程美金版图文教程
栏 目:
下一篇:Powershell小技巧之通过EventLog查看近期电脑开机和关机时间
本文地址:http://www.codeinn.net/misctech/52821.html






