Add Width() and Height() to Box.

This commit is contained in:
Isaac Connor committed 2022-05-06 11:43:49 -04:00
1 parent 442dff3f8a
commit fc4381b180
1 file changed
+2
+2
View File
@@ -36,6 +36,8 @@ class Box {
const Vector2 &Lo() const { return lo_; }
const Vector2 &Hi() const { return hi_; }
unsigned int Width() const { return hi_.x_ - lo_.x_; }
unsigned int Height() const { return hi_.y_ - lo_.y_; }
const Vector2 &Size() const { return size_; }
int32 Area() const { return size_.x_ * size_.y_; }