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


< > BotCompany Repo | #1030695 // resizeDoubleArray

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

Libraryless. Click here for Pure Java version (2751L/16K).

static double[] resizeDoubleArray(double[] a, int n) {
  if (n == l(a)) ret a;
  double[] b = new double[n];
  arraycopy(a, 0, b, 0, min(l(a), n));
  ret b;

Author comment

Began life as a copy of #1023056

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030695
Snippet name: resizeDoubleArray
Eternal ID of this version: #1030695/1
Text MD5: 81f30d481d938ddf8dc06dc040df864b
Transpilation MD5: b3b01c34444ee8933665f843078c6c4d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-08 12:23:44
Source code size: 163 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 131 / 198
Referenced in: [show references]