Skip to content

Commit

Permalink
🦄 refactor: 调整代码位置
Browse files Browse the repository at this point in the history
  • Loading branch information
kiccer committed Jul 22, 2022
1 parent 4ab46c0 commit a9fd6e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Soldier76.lua
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,6 @@ function pubg.autoSleep (isTest)
Sleep(random)
end

--[[ 四舍五入 #170 ]]
function math.round (num, digit)
local decimalPlaces = 10 ^ (digit or 0)
return math.floor((num * decimalPlaces * 10 + 5) / 10) / decimalPlaces
end

--[[ get real y position ]]
function pubg.getRealY (options, y)
local realY = y
Expand Down Expand Up @@ -1214,6 +1208,12 @@ end

--[[ tools ]]

-- 四舍五入 #170
function math.round (num, digit)
local decimalPlaces = 10 ^ (digit or 0)
return math.floor((num * decimalPlaces * 10 + 5) / 10) / decimalPlaces
end

-- split function
function string.split (str, s)
if string.find(str, s) == nil then return { str } end
Expand Down

0 comments on commit a9fd6e9

Please sign in to comment.