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

7
LINES

< > BotCompany Repo | #1019793 // ptGrid - get all points in a grid

JavaX fragment (include)

static L<Pt> ptGrid(int x1, int y1, int w, int h, int stepX, int stepY) {
  new L<Pt> l;
  for (int y = 0; y < h; y += stepY)
    for (int x = 0; x < w; x += stepX)
      l.add(pt(x1+x, y1+y));
  ret l;
}

Author comment

Began life as a copy of #1019792

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019793
Snippet name: ptGrid - get all points in a grid
Eternal ID of this version: #1019793/1
Text MD5: 3e000ffd42593a156af709536a8bd194
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-26 19:39:48
Source code size: 210 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 263 / 295
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)