[Feat] (Range1D): IntersectionUpdate

This commit is contained in:
2025-07-17 23:09:24 +08:00
parent 3f0a99d272
commit 99eaf317ba
+8
View File
@@ -91,6 +91,14 @@ namespace MobileGL {
start = std::min(start, newStart);
end = std::max(end, newEnd);
}
void IntersectionUpdate(SizeT newStart, SizeT newEnd) {
start = std::max(start, newStart);
end = std::min(end, newEnd);
if (start > end) {
throw RuntimeError("Invalid intersection: start must be less than end");
}
}
};
template<typename ObjectType>