Unnecessary overlap check
This commit is contained in:
parent
75ef97b6c2
commit
65d166b909
|
@ -100,11 +100,9 @@ public class Main {
|
|||
|
||||
var rr = new NumberRange<>(start, end, null);
|
||||
|
||||
if (r.isOverlappedBy(rr)) {
|
||||
var intersection = rr.intersectionWith(r);
|
||||
var intersection = rr.intersectionWith(r);
|
||||
|
||||
newRanges.add(new NumberRange<>(intersection.getMinimum(), intersection.getMaximum(), null));
|
||||
}
|
||||
newRanges.add(new NumberRange<>(intersection.getMinimum(), intersection.getMaximum(), null));
|
||||
}
|
||||
|
||||
return newRanges.stream();
|
||||
|
|
Loading…
Reference in New Issue