From a9fd6e96c3b185219978afc201dd14674f5923c6 Mon Sep 17 00:00:00 2001 From: kiccer <1072907338@qq.com> Date: Fri, 22 Jul 2022 22:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor:=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Soldier76.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Soldier76.lua b/Soldier76.lua index 44b3512..a2a6ae4 100644 --- a/Soldier76.lua +++ b/Soldier76.lua @@ -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 @@ -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