made system use full salt+pepper
This commit is contained in:
1 parent
055dd4e606
commit
df62414229
4 files changed
+9
-11
No files matched your search
@@ -198,6 +198,7 @@ local ok, err = xpcall(function()
|
||||
local smallestDiff = math.huge
|
||||
|
||||
for k, _ in pairs(tbl) do
|
||||
if k==target then return k end
|
||||
local diff = math.abs(k - target)
|
||||
if diff < smallestDiff then
|
||||
smallestDiff = diff
|
||||
|
||||
@@ -49,6 +49,7 @@ local function findClosest(tbl, target)
|
||||
local smallestDiff = math.huge
|
||||
|
||||
for k, _ in pairs(tbl) do
|
||||
if k==target then return k end
|
||||
local diff = math.abs(k - target)
|
||||
if diff < smallestDiff then
|
||||
smallestDiff = diff
|
||||
|
||||
Reference in new issue
Block a user