mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-13 01:54:08 +00:00
commit
5cb7e2e42a
22 changed files with 2331 additions and 60 deletions
|
@ -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;
|
||||
|
|
|
@ -13,13 +13,14 @@ public:
|
|||
|
||||
void Normalise(void){
|
||||
float sq = MagnitudeSqr();
|
||||
if(sq > 0.0f){
|
||||
//if(sq > 0.0f){
|
||||
float invsqrt = RecipSqrt(sq);
|
||||
x *= invsqrt;
|
||||
y *= invsqrt;
|
||||
}else
|
||||
x = 1.0f;
|
||||
//}else
|
||||
// x = 1.0f;
|
||||
}
|
||||
|
||||
const CVector2D &operator+=(CVector2D const &right) {
|
||||
x += right.x;
|
||||
y += right.y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue