Transpiled version (2084L) is out of date.
// params = value, count, value, count, ... static double weightedAverage_lit(double... params) { double total = 0, sum = 0; for (int i = 0; i < l(params); i += 2) { double weight = params[i+1]; sum += params[i]*weight; total += weight; } ret doubleRatio(sum, total); }
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: | #1025111 |
| Snippet name: | weightedAverage_lit |
| Eternal ID of this version: | #1025111/3 |
| Text MD5: | 5e1a8925008973d04f1b51edf6299335 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-09-05 19:17:04 |
| Source code size: | 298 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 487 / 621 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |