mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-28 16:29:34 +08:00

- Put the MIT copyright at the end. - Move the directory /other -> tools - Various improvements.
20 lines
457 B
C++
20 lines
457 B
C++
#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
|
|
|
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
|
// Use of this source code is governed by the MIT license that can be found in
|
|
// the LICENSE file.
|