summaryrefslogtreecommitdiff
path: root/src/helpers/Box.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-11-04 21:45:34 +0000
committerVaxry <vaxry@vaxry.net>2023-11-04 21:45:34 +0000
commit931927de29256a46004cd6f71fdf45ed76470b73 (patch)
treeb8ae286034e1ac782cca4d72e842f3dcf900eeb6 /src/helpers/Box.cpp
parent74cf2281dd38a533916eb0b201c3128423b94d7c (diff)
dwindle: move to CBox for expressing nodes
Diffstat (limited to 'src/helpers/Box.cpp')
-rw-r--r--src/helpers/Box.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/helpers/Box.cpp b/src/helpers/Box.cpp
index 450871cb..e71ed622 100644
--- a/src/helpers/Box.cpp
+++ b/src/helpers/Box.cpp
@@ -101,4 +101,12 @@ CBox CBox::roundInternal() {
float newH = y + h - std::floor(y);
return CBox{std::floor(x), std::floor(y), std::floor(newW), std::floor(newH)};
-} \ No newline at end of file
+}
+
+Vector2D CBox::pos() const {
+ return {x, y};
+}
+
+Vector2D CBox::size() const {
+ return {w, h};
+}