diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-07 19:12:13 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-12-07 19:12:13 +0100 |
commit | c5fbb594a51f37e5a3af6c6b98342a71c8fe4611 (patch) | |
tree | 50a9a7cf3f5ff72d905eac13dfa68b6151caed3f /src/math | |
parent | Update librw (diff) | |
download | re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.tar re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.tar.gz re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.tar.bz2 re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.tar.lz re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.tar.xz re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.tar.zst re3-c5fbb594a51f37e5a3af6c6b98342a71c8fe4611.zip |
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/Rect.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/math/Rect.h b/src/math/Rect.h index fa8d8de4..e9b25896 100644 --- a/src/math/Rect.h +++ b/src/math/Rect.h @@ -42,13 +42,30 @@ public: bottom += y; top += y; } - void Grow(float r){ + + void Grow(float r) { left -= r; right += r; top -= r; bottom += r; } + void Grow(float l, float r) + { + left -= l; + top -= l; + right += r; + bottom += r; + } + + void Grow(float l, float r, float t, float b) + { + left -= l; + top -= t; + right += r; + bottom += b; + } + float GetWidth(void) { return right - left; } float GetHeight(void) { return bottom - top; } }; |