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

9
LINES

< > BotCompany Repo | #1005877 // intersectRanges

JavaX fragment (include)

static Range intersectRanges(Range a, Range b) {
  float min = max(a.min, b.min);
  float max = min(a.max, b.max);
  ret min <= max ? new Range(min, max) : null;
}

static DoubleRange intersectRanges(DoubleRange a, DoubleRange b) {
  ret intersectDoubleRanges(a, b);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005877
Snippet name: intersectRanges
Eternal ID of this version: #1005877/2
Text MD5: 015a2dcea10a2a3b5e17c105779a8d61
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-09 21:24:53
Source code size: 276 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 484 / 499
Version history: 1 change(s)
Referenced in: [show references]