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

5
LINES

< > BotCompany Repo | #1033036 // intersectDoubleRanges

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

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

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

Author comment

Began life as a copy of #1028623

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033036
Snippet name: intersectDoubleRanges
Eternal ID of this version: #1033036/1
Text MD5: e405403815ba2afdd05b35fe91e590e1
Transpilation MD5: 975d3215f5285dc36191669380a36793
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-11 15:00:01
Source code size: 207 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 148 / 244
Referenced in: [show references]