mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00
14
src/ftxui/screen/box.cpp
Normal file
14
src/ftxui/screen/box.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "ftxui/screen/box.hpp"
|
||||
#include <algorithm>
|
||||
|
||||
namespace ftxui {
|
||||
// static
|
||||
Box Box::Intersection(Box a, Box b) {
|
||||
return Box{
|
||||
std::max(a.x_min, b.x_min),
|
||||
std::min(a.x_max, b.x_max),
|
||||
std::max(a.y_min, b.y_min),
|
||||
std::min(a.y_max, b.y_max),
|
||||
};
|
||||
}
|
||||
} // namespace ftxui
|
Reference in New Issue
Block a user