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

7
LINES

< > BotCompany Repo | #1033387 // forEachWithPosition

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

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

1  
static <A> void forEachWithPosition(Matrix<A> m, IVF3<Int, Int, A> f) {
2  
  if (m == null || f == null) ret;
3  
  int w = m.getWidth(), h = m.getHeight();
4  
  for y to h:
5  
    for x to w:
6  
      f.get(x, y, m.get(x, y));
7  
}

Author comment

Began life as a copy of #1022895

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033387
Snippet name: forEachWithPosition
Eternal ID of this version: #1033387/3
Text MD5: 8556a38fc0029326bff6273a8ad81c25
Transpilation MD5: d036378fe7a648e26e6213f4e2c74c84
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-27 00:47:10
Source code size: 219 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 200
Version history: 2 change(s)
Referenced in: [show references]