lua math.fmod使用注意小数问题
2015-05-25 17:24
246 查看
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
相关文章推荐
- Lua math.fmod使用时的小数问题
- Lua脚本接入Android使用JNI调用本地接口,需要注意的问题
- 使用protoc-gen-lua-master需要注意的问题
- 无线网络覆盖-java中,用Math.sqrt()时,必须要注意小数问题
- js解决IE8不支持html5,css3的问题(respond.js 的使用注意)
- java 使用AtomicStampedReference解决ABA问题需要注意的坑
- CentOS7.x系统中使用Docker时,在存储方面需要注意的问题
- 【手记】小心在where中使用NEWID()的大坑 【手记】解决启动SQL Server Management Studio 17时报Cannot find one of more components...的问题 【C#】组件分享:FormDragger窗体拖拽器 【手记】注意BinaryWriter写string的小坑——会在string前加上长度前缀length-prefixed
- JAVA使用并行流(ParallelStream)时要注意的一些问题
- php foreach 使用&(与运算符)引用赋值要注意的问题
- javascript 使用 NodeList需要注意的问题
- php下使用iconv需要注意的问题
- 使用scanf函数时应该注意的问题
- Arduino使用PN532注意问题#NFC
- linux 上使用commons-net.jar注意的问题
- 使用phantomjs操作DOM并对页面进行截图需要注意的几个问题
- 使用redis缓存数据需要注意的问题以及个人的一些思考和理解
- 使用git和远程仓库应该注意的问题