Libraryless. Click here for Pure Java version (2940L/17K).
static L<Pt> allPointsInRect(int w, int h) { ret allPointsInRect(rect(w, h)); } static L<Pt> allPointsInRect(Rect r) { int w = r.w, h = r.h; L<Pt> l = emptyList(w*h); for y to h: for x to w: l.add(pt(r.x+x, r.y+y)); ret l; }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025246 |
Snippet name: | allPointsInRect |
Eternal ID of this version: | #1025246/4 |
Text MD5: | fe43da8513d43d765c68c66229365978 |
Transpilation MD5: | c11655e50823c76a72a24486d4fa244e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-07 16:45:59 |
Source code size: | 244 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 227 / 339 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |