AG广东会,山东十一选五,大发

?
  • AG广东会400电话
  • 微网小程序
  • AI电话山东十一选五
  • 电商代运营
  • AG广东会,山东十一选五,大发:全 部 栏 目

    AG广东会400电话 网络优化推广 AI电话山东十一选五 呼叫中心 网站建设 商标?知产 微网小程序 电商运营 彩铃?短信 增值拓展业务
    Lua math.fmod使用时的小数问题
    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时间转化的几个小例子
    下一篇:Lua多行注释和取消多行注释的方法
  • 相关文章
  • ?

    ? 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    Lua math.fmod使用时的小数问题 Lua,math.fmod,使,用时,的,小数,

    AG广东会官网入口(中国)官方网站-IOS/Android通用版(2026已更新)