Libraryless. Click here for Pure Java version (42L/1K).
1 | static <A> ArrayList<Double> floatArrayToDoubleList(float[] a) {
|
2 | if (a == null) null; |
3 | ret floatArrayToDoubleList(a, 0, a.length); |
4 | } |
5 | |
6 | // no range checking on from/to in the interest of speed |
7 | static <A> ArrayList<Double> floatArrayToDoubleList(float[] a, int from, int to) {
|
8 | if (a == null) null; |
9 | ArrayList<Double> l = new(to-from); |
10 | for (int i = from; i < to; i++) l.add((double) a[i]); |
11 | ret l; |
12 | } |
Began life as a copy of #1036160
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1036277 |
| Snippet name: | floatArrayToDoubleList (makes an ArrayList) |
| Eternal ID of this version: | #1036277/4 |
| Text MD5: | 561906317f1a740b0a5e62e67d8c13d4 |
| Transpilation MD5: | 697ac8fdca9f42de07ce67f14c643f1b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-11-08 13:06:09 |
| Source code size: | 415 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 451 / 573 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |