geom/aabb: define combining 'or' operator

This commit is contained in:
Danny Robson 2018-05-18 13:51:19 +10:00
parent 09dfad5391
commit e77f59e3ae

View File

@ -109,6 +109,14 @@ namespace util::geom {
return *this = *this | p;
}
aabb operator| [[nodiscard]] (aabb<S,T> rhs) const noexcept
{
return {
min (lo, rhs.lo),
max (hi, rhs.hi)
};
}
::util::point<S,T> lo;
::util::point<S,T> hi;