diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-04-15 08:03:53 +0300 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2020-04-15 08:03:53 +0300 |
commit | daed13485ef47d9c8992e53e1a976fba237fca50 (patch) | |
tree | f8116c26ac5f95a77375d67daffddbeaa19177e0 /src/math/Vector.h | |
parent | 6473778c47efa1e8c1e2d8eea405de98f378cd69 (diff) |
CWeapon done, ps2 cheats fix
Diffstat (limited to 'src/math/Vector.h')
-rw-r--r-- | src/math/Vector.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/math/Vector.h b/src/math/Vector.h index 6f544ada..9b732610 100644 --- a/src/math/Vector.h +++ b/src/math/Vector.h @@ -46,6 +46,13 @@ public: y *= invsqrt; z *= invsqrt; } + + void Normalise2D(void) { + float sq = MagnitudeSqr2D(); + float invsqrt = RecipSqrt(sq); + x *= invsqrt; + y *= invsqrt; + } const CVector &operator+=(CVector const &right) { x += right.x; |