Libraryless. Click here for Pure Java version (2527L/16K).
1 | static double doubleProduct(Iterable<Double> l) { |
2 | double prod = 1; |
3 | fOr (Double i : l) |
4 | if (i != null) prod *= i; |
5 | ret prod; |
6 | } |
7 | |
8 | static double doubleProduct(double... l) { |
9 | double prod = 1; |
10 | if (l != null) for (double i : l) |
11 | prod *= i; |
12 | ret prod; |
13 | } |
Began life as a copy of #1019131
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028081 |
Snippet name: | doubleProduct |
Eternal ID of this version: | #1028081/1 |
Text MD5: | 24f33289fa2eb1290680d8e5616f866e |
Transpilation MD5: | 39ba1e8443879ad42d9db5a5b32c4518 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-05-17 15:39:42 |
Source code size: | 273 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 192 / 289 |
Referenced in: | [show references] |