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

11
LINES

< > BotCompany Repo | #1024752 // floatMax

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2128L/13K).

static float floatMax(Collection<Float> l) {
  float x = -Float.MAX_VALUE;
  fOr (float i : l) x = max(x, i);
  ret x;
}

static float floatMax(float[] l) {
  float x = -Float.MAX_VALUE;
  if (l != null) for (float i : l) x = max(x, i);
  ret x;
}

Author comment

Began life as a copy of #1024748

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: #1024752
Snippet name: floatMax
Eternal ID of this version: #1024752/5
Text MD5: 8b2e05c07cd6500e3c62f61a884bffa2
Transpilation MD5: 24dae8d5222f53fd77e4120b260d3b00
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-03 22:04:31
Source code size: 257 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 245 / 333
Version history: 4 change(s)
Referenced in: [show references]