From da418b56ab2f93b45c58317c611bffe74198e9df Mon Sep 17 00:00:00 2001 From: Anatolii Aniskovych Date: Fri, 18 May 2018 23:44:35 +0300 Subject: [PATCH] gears.geometry: Make area_intersect_area() public --- lib/gears/geometry.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gears/geometry.lua b/lib/gears/geometry.lua index 70628888..876fb1e6 100644 --- a/lib/gears/geometry.lua +++ b/lib/gears/geometry.lua @@ -151,7 +151,7 @@ end -- @param a The area. -- @param b The other area. -- @return True if they intersect, false otherwise. -local function area_intersect_area(a, b) +function gears.geometry.rectangle.area_intersect_area(a, b) return (b.x < a.x + a.width and b.x + b.width > a.x and b.y < a.y + a.height @@ -194,7 +194,7 @@ end function gears.geometry.rectangle.area_remove(areas, elem) for i = #areas, 1, -1 do -- Check if the 'elem' intersect - if area_intersect_area(areas[i], elem) then + if gears.geometry.rectangle.area_intersect_area(areas[i], elem) then -- It does? remove it local r = table.remove(areas, i) local inter = gears.geometry.rectangle.get_intersection(r, elem)