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

11
LINES

< > BotCompany Repo | #1025104 // concatFloatArrays (allows null arrays)

JavaX fragment (include)

1  
static float[] concatFloatArrays(L<float[]> arrays) {
2  
  int l = 0;
3  
  for (float[] a : unnull(arrays)) l += l(a);
4  
  float[] x = new float[l];
5  
  int i = 0;
6  
  for (float[] a : unnull(arrays)) if (a != null) {
7  
    System.arraycopy(a, 0, x, i, l(a));
8  
    i += l(a);
9  
  }
10  
  ret x;
11  
}

Author comment

Began life as a copy of #1016682

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: #1025104
Snippet name: concatFloatArrays (allows null arrays)
Eternal ID of this version: #1025104/4
Text MD5: df9822abe51c52c702feeefa05b33d00
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-05 15:52:22
Source code size: 287 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 233 / 288
Version history: 3 change(s)
Referenced in: [show references]