mirror of
https://github.com/halpz/re3.git
synced 2025-07-22 01:19:48 +00:00
@ -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;
|
||||
|
Reference in New Issue
Block a user