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

12
LINES

< > BotCompany Repo | #1015489 // dropOverlappingRects

JavaX fragment (include)

// TODO: optimize
static L<Rect> dropOverlappingRects(L<Rect> l) {
  new L<Rect> out;
  bigloop: for (int i = 0; i < l(l); i++) {
    Rect a = l.get(i);
    for (Rect r : out)
      if (rectsOverlap(a, r))
        continue bigloop;
    out.add(a);
  }
  ret out;
}

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: 370 / 400
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)