diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-01 12:53:20 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-01 12:53:20 +0100 |
commit | 9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69 (patch) | |
tree | 49f4d64c4ee48b03e9ac032fca6b97259d181935 /src/math/Rect.h | |
parent | Merge branch 'miami' of github.com:GTAmodding/re3 into miami (diff) | |
parent | actual struct name (diff) | |
download | re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.tar re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.tar.gz re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.tar.bz2 re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.tar.lz re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.tar.xz re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.tar.zst re3-9fd93e8e5792781b1bce0eb5d75aa6eff00d9f69.zip |
Diffstat (limited to '')
-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; } }; |