Libraryless. Click here for Pure Java version (3934L/23K).
static IntRange joinIntRanges(IntRange a, IntRange b) { if (a == null) ret b; if (b == null) ret a; ret IntRange(min(a.start, b.start), max(a.end, b.end)); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032570 |
Snippet name: | joinIntRanges |
Eternal ID of this version: | #1032570/1 |
Text MD5: | b289a8f2de9c7719e0e6eab9296e25fe |
Transpilation MD5: | 95a65ae1ef51271399815f7d6eced689 |
Author: | stefan |
Category: | javax / maths |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-23 00:17:58 |
Source code size: | 167 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 145 / 211 |
Referenced in: | [show references] |