Libraryless. Click here for Pure Java version (2128L/13K).
1 | static float floatMax(Collection<Float> l) {
|
2 | float x = -Float.MAX_VALUE; |
3 | fOr (float i : l) x = max(x, i); |
4 | ret x; |
5 | } |
6 | |
7 | static float floatMax(float[] l) {
|
8 | float x = -Float.MAX_VALUE; |
9 | if (l != null) for (float i : l) x = max(x, i); |
10 | ret x; |
11 | } |
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: | 452 / 583 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |