Libraryless. Click here for Pure Java version (4010L/23K).
static DoubleRange intersectDoubleRanges(DoubleRange a, DoubleRange b) { double start = max(a.start, b.start); double end = min(a.end, b.end); ret start <= end ? DoubleRange(start, end) : null; }
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: | 348 / 505 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |