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

5
LINES

< > BotCompany Repo | #1028623 // intersectLongRanges

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

Libraryless. Click here for Pure Java version (165L/2K).

1  
static LongRange intersectLongRanges(LongRange a, LongRange b) {
2  
  long start = max(a.start, b.start);
3  
  long end = min(a.end, b.end);
4  
  ret start <= end ? LongRange(start, end) : null;
5  
}

Author comment

Began life as a copy of #1005877

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028623
Snippet name: intersectLongRanges
Eternal ID of this version: #1028623/2
Text MD5: 50e4e5d5275d3acd6848041a3ee0e9a3
Transpilation MD5: 59d824ca0834bfe278651f589f337d2a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-29 10:45:47
Source code size: 193 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 181 / 283
Version history: 1 change(s)
Referenced in: [show references]