1 | static Range intersectRanges(Range a, Range b) { |
2 | float min = max(a.min, b.min); |
3 | float max = min(a.max, b.max); |
4 | ret min <= max ? new Range(min, max) : null; |
5 | } |
6 | |
7 | static DoubleRange intersectRanges(DoubleRange a, DoubleRange b) { |
8 | ret intersectDoubleRanges(a, b); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005877 |
Snippet name: | intersectRanges |
Eternal ID of this version: | #1005877/2 |
Text MD5: | 015a2dcea10a2a3b5e17c105779a8d61 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-07-09 21:24:53 |
Source code size: | 276 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 543 / 568 |
Version history: | 1 change(s) |
Referenced in: | [show references] |