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

20
LINES

< > BotCompany Repo | #1025079 // doubleMax

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

Transpiled version (114L) is out of date.

static double doubleMax(Iterable<Double> l) {
  double max = negativeInfinity();
  fOr (double d : l)
    max = Math.max(max, d);
  ret max;
}

static double doubleMax(double[] l) {
  double max = negativeInfinity();
  fOr (double d : l)
    max = Math.max(max, d);
  ret max;
}

static double doubleMax(double[] l, int from, int to) {
  double max = negativeInfinity();
  for (int i = from; i < to; i++)
    max = Math.max(max, l[i]);
  ret max;
}

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: #1025079
Snippet name: doubleMax
Eternal ID of this version: #1025079/4
Text MD5: d87e63f34ed7e6d0132d1aa488e18f12
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-10-24 00:51:22
Source code size: 467 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 256 / 367
Version history: 3 change(s)
Referenced in: [show references]