mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Feat] (Range1D): IntersectionUpdate
This commit is contained in:
@@ -91,6 +91,14 @@ namespace MobileGL {
|
|||||||
start = std::min(start, newStart);
|
start = std::min(start, newStart);
|
||||||
end = std::max(end, newEnd);
|
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>
|
template<typename ObjectType>
|
||||||
|
|||||||
Reference in New Issue
Block a user