diff --git a/coloquinte/src/coloquinte/common.hxx b/coloquinte/src/coloquinte/common.hxx index a5ce9497..97025967 100644 --- a/coloquinte/src/coloquinte/common.hxx +++ b/coloquinte/src/coloquinte/common.hxx @@ -89,6 +89,14 @@ struct box{ std::min(y_max_, o.y_max_) ); } + box bounding_box(box const o) const{ + return box( + std::min(x_min_, o.x_min_), + std::max(x_max_, o.x_max_), + std::min(y_min_, o.y_min_), + std::max(y_max_, o.y_max_) + ); + } point dimensions() const{ return point(x_max_-x_min_, y_max_-y_min_); }