From c5fbb594a51f37e5a3af6c6b98342a71c8fe4611 Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Mon, 7 Dec 2020 21:12:13 +0300 Subject: ps2 hud, restore original code --- src/math/Rect.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/math') 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; } }; -- cgit v1.2.3 From df5bafc80c544382b3def3925e50cf2ad3382a03 Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 18 Dec 2020 23:47:38 +0100 Subject: anim fixes --- src/math/Quaternion.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/math') diff --git a/src/math/Quaternion.h b/src/math/Quaternion.h index a5a34626..47c94f7c 100644 --- a/src/math/Quaternion.h +++ b/src/math/Quaternion.h @@ -12,6 +12,11 @@ public: float MagnitudeSqr(void) const { return x*x + y*y + z*z + w*w; } void Normalise(void); void Multiply(const CQuaternion &q1, const CQuaternion &q2); + void Invert(void){ // Conjugate would have been a better name + x = -x; + y = -y; + z = -z; + } const CQuaternion &operator+=(CQuaternion const &right) { x += right.x; -- cgit v1.2.3