Libraryless. Click here for Pure Java version (2754L/16K).
1 | static double[] subDoubleArray(double[] b, int start, int end default l(b)) { |
2 | start = max(start, 0); end = min(end, l(b)); |
3 | if (start == 0 && end == l(b)) ret b; |
4 | if (start >= end) ret new double[0]; |
5 | double[] x = new double[end-start]; |
6 | System.arraycopy(b, start, x, 0, end-start); |
7 | ret x; |
8 | } |
Began life as a copy of #1014874
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030693 |
Snippet name: | subDoubleArray |
Eternal ID of this version: | #1030693/1 |
Text MD5: | fae6f954ec6cc2d881c00e21e0362182 |
Transpilation MD5: | 4baaa2307ff718f41c9960e5be75016d |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-08 12:21:33 |
Source code size: | 306 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 254 / 333 |
Referenced in: | [show references] |