Lua 取整取余
2016-07-12 本文已影响6960人
曾令伟
expNums = 10
对 3 取整 取余
local line = math.modf( expNums / 3 ) -- 取整数
local mod = math.fmod( expNums, 3 ) -- 取余数
Lua math

expNums = 10
对 3 取整 取余
local line = math.modf( expNums / 3 ) -- 取整数
local mod = math.fmod( expNums, 3 ) -- 取余数
Lua math