Libraryless. Click here for Pure Java version (165L/2K).
static LongRange intersectLongRanges(LongRange a, LongRange b) { long start = max(a.start, b.start); long end = min(a.end, b.end); ret start <= end ? LongRange(start, end) : null; }
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: | 180 / 281 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1029482 - intersectIntRanges #1033036 - intersectDoubleRanges |