Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1024749 // floatSum

JavaX fragment (include)

static float floatSum(Iterable<Float> l) {
  float sum = 0;
  for (Float i : unnull(l))
    if (i != null) sum += i;
  ret sum;
}

static float floatSum(float... l) {
  float sum = 0;
  if (l != null) for (float i : l)
    sum += i;
  ret sum;
}

Author comment

Began life as a copy of #1019131

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: #1024749
Snippet name: floatSum
Eternal ID of this version: #1024749/1
Text MD5: 6b5dca1bb5375321720f509c80baa4df
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-24 16:11:30
Source code size: 257 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 183 / 215
Referenced in: [show references]