Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1015489 // dropOverlappingRects

JavaX fragment (include)

1  
// TODO: optimize
2  
static L<Rect> dropOverlappingRects(L<Rect> l) {
3  
  new L<Rect> out;
4  
  bigloop: for (int i = 0; i < l(l); i++) {
5  
    Rect a = l.get(i);
6  
    for (Rect r : out)
7  
      if (rectsOverlap(a, r))
8  
        continue bigloop;
9  
    out.add(a);
10  
  }
11  
  ret out;
12  
}

Author comment

Began life as a copy of #1009153

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015489
Snippet name: dropOverlappingRects
Eternal ID of this version: #1015489/1
Text MD5: 0cd067e8d807e6ad8c376bb7167517aa
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-15 02:05:48
Source code size: 275 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 371 / 402
Referenced in: [show references]