mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[Feat] (Range1D): IntersectionUpdate
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user