implement naive packer
This commit is contained in:
parent
8698cf8160
commit
e31683d2fe
8 changed files with 114 additions and 78 deletions
|
@ -2,21 +2,12 @@
|
|||
|
||||
namespace freling {
|
||||
|
||||
int BoundingBox::width() const {
|
||||
return right - left;
|
||||
}
|
||||
|
||||
int BoundingBox::height() const {
|
||||
return bottom - top;
|
||||
}
|
||||
|
||||
int BoundingBox::area() const {
|
||||
return width() * height();
|
||||
return width * height;
|
||||
}
|
||||
|
||||
bool BoundingBox::operator==(const BoundingBox& b) const {
|
||||
return left == b.left and top == b.top and right == b.right and
|
||||
bottom == b.bottom;
|
||||
return x == b.x and y == b.y and width == b.width and height == b.height;
|
||||
}
|
||||
|
||||
} // namespace freling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue