1 | static double getAverage(L l, S field) { |
2 | double sum = 0; |
3 | for (O x : l) |
4 | sum += toDouble(get(x, field)); |
5 | ret sum/l(l); |
6 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002177 |
Snippet name: | getAverage |
Eternal ID of this version: | #1002177/1 |
Text MD5: | 6d2711e1323e593f7b8a494c610b9aee |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-23 16:28:30 |
Source code size: | 133 bytes / 6 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 622 / 915 |
Referenced in: | [show references] |