Libraryless. Click here for Pure Java version (120L/1K).
1 | static float[] toFloatArray(L<Float> l) { |
2 | float[] a = new float[l(l)]; |
3 | for (int i = 0; i < a.length; i++) |
4 | a[i] = l.get(i); |
5 | ret a; |
6 | } |
7 | |
8 | static float[] toFloatArray(double[] l) { |
9 | float[] a = new[l(l)]; |
10 | for (int i = 0; i < a.length; i++) |
11 | a[i] = (float) l[i]; |
12 | ret a; |
13 | } |
Began life as a copy of #1004992
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: | #1024602 |
Snippet name: | toFloatArray |
Eternal ID of this version: | #1024602/2 |
Text MD5: | 127f8712078fe9d36d78563b80697bb4 |
Transpilation MD5: | f6f5289735d6b0fa378556b3ce130397 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-01 08:55:30 |
Source code size: | 294 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 220 / 307 |
Version history: | 1 change(s) |
Referenced in: | [show references] |