Libraryless. Click here for Pure Java version (9186L/51K).
1 | static double floatSumAsDouble(Iterable<Float> l) { |
2 | double sum = 0; |
3 | for (Float i : unnull(l)) |
4 | if (i != null) sum += i; |
5 | ret sum; |
6 | } |
7 | |
8 | static double floatSumAsDouble(float... l) { |
9 | double sum = 0; |
10 | if (l != null) for (float i : l) |
11 | sum += i; |
12 | ret sum; |
13 | } |
Began life as a copy of #1024749
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1035866 |
Snippet name: | floatSumAsDouble |
Eternal ID of this version: | #1035866/1 |
Text MD5: | d47ce30b419c6361ecd76471ed622e6a |
Transpilation MD5: | 07416f2391c5cc84cf699642421766f4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-08-05 15:28:17 |
Source code size: | 277 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 135 / 187 |
Referenced in: | [show references] |