diff options
author | aap <aap@papnet.eu> | 2021-01-01 14:02:05 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-01 14:02:05 +0100 |
commit | 60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a (patch) | |
tree | 32df20ab58a7e47e5dbf109468135b046daa017d /src/math | |
parent | wrong bike fall off anim (diff) | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
download | re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.tar re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.tar.gz re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.tar.bz2 re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.tar.lz re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.tar.xz re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.tar.zst re3-60197c2d7e89836d1e31f9cf80cfbcea8bad8f8a.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; } }; |