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

11
LINES

< > BotCompany Repo | #1033590 // allPointsInRect_virtual

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4969L/28K).

static L<Pt> allPointsInRect_virtual(int w, int h) {
  ret virtualList(i -> pt(i%w, i/w), w*h);
}

static L<Pt> allPointsInRect_virtual(int x, int y, int w, int h) {
  ret virtualList(i -> pt(x+i%w, y+i/w), w*h);
}

static L<Pt> allPointsInRect_virtual(Rect r) {
  ret allPointsInRect_virtual(r.x, r.y, r.w, r.h);
}

Author comment

Began life as a copy of #1033584

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033590
Snippet name: allPointsInRect_virtual
Eternal ID of this version: #1033590/4
Text MD5: f4ad99a4bc76641380588dcac8591ec6
Transpilation MD5: 073bd59fe188a21d309433537005c347
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-22 22:42:40
Source code size: 325 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 76 / 122
Version history: 3 change(s)
Referenced in: [show references]