initialization is very slightly faster this way, I think
This commit is contained in:
@ -350,14 +350,12 @@ prof(function(b1,b2)
|
||||
and b1[3]>=b2[1]
|
||||
and b1[4]>=b2[2]
|
||||
end,function(b1, b2)
|
||||
local b1x1, b1y1, b1x2, b1y2 = unpack(b1)
|
||||
local b2x1, b2y1, b2x2, b2y2 = unpack(b2)
|
||||
return
|
||||
b1x1<=b2x2
|
||||
and b1y1<=b2y2
|
||||
and b1x2>=b2x1
|
||||
and b2y2>=b2y1
|
||||
end,{ locals={{1,1,1,1},{1,1,1,1}} })
|
||||
b1.x1<=b2.x2
|
||||
and b1.y1<=b2.y2
|
||||
and b1.x2>=b2.x1
|
||||
and b1.y2>=b2.y1
|
||||
end,{ locals={{1,1,1,1,x1=1,x2=1,y1=1,y2=1},{1,1,1,1,x1=1,x2=1,y1=1,y2=1}} })
|
||||
|
||||
-- "locals" (optional) are
|
||||
-- passed in as args. see the
|
||||
|
Reference in New Issue
Block a user