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

5
LINES

< > BotCompany Repo | #1033296 // joinDoubleRanges

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

Libraryless. Click here for Pure Java version (4012L/23K).

1  
static DoubleRange joinDoubleRanges(DoubleRange a, DoubleRange b) {
2  
  if (a == null) ret b;
3  
  if (b == null) ret a;
4  
  ret DoubleRange(min(a.start, b.start), max(a.end, b.end));
5  
}

Author comment

Began life as a copy of #1032570

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033296
Snippet name: joinDoubleRanges
Eternal ID of this version: #1033296/1
Text MD5: 380fd2a461f772d6e405024e3f94b395
Transpilation MD5: f6e823cfffb75263d2651e9b2293e0a0
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-18 12:00:37
Source code size: 182 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 164 / 224
Referenced in: [show references]