Unnecessary overlap check

This commit is contained in:
Natty 2023-12-05 20:30:25 +01:00
parent 75ef97b6c2
commit 65d166b909
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 2 additions and 4 deletions

View File

@ -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();