refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-10-24 20:50:10 +02:00
parent 489c528327
commit 1033d15eae
29 changed files with 189 additions and 189 deletions
+5 -5
View File
@@ -3,11 +3,11 @@ module 'aux.util.sort'
include 'green_t'
include 'aux'
public.EQ = 0
public.LT = 1
public.GT = 2
M.EQ = 0
M.LT = 1
M.GT = 2
function public.compare(a, b, desc)
function M.compare(a, b, desc)
if a < b then
return desc and GT or LT
elseif a > b then
@@ -17,7 +17,7 @@ function public.compare(a, b, desc)
end
end
public.multi_lt = vararg-function(arg)
M.multi_lt = vararg-function(arg)
for i = 1, getn(arg), 2 do
if arg[i] and arg[i + 1] and arg[i] ~= arg[i + 1] then
return arg[i] < arg[i + 1]