summaryrefslogtreecommitdiffstats
path: root/src/math/Vector2D.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-15 22:31:52 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-15 22:31:52 +0200
commit1795f3d47993e7a9833e6f265bb91fb6ce400f1c (patch)
tree766dd0f14ba4df90cbac836c03cdfc501c9cd009 /src/math/Vector2D.h
parentfix (diff)
parentMerge pull request #440 from Fire-Head/master (diff)
downloadre3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.tar
re3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.tar.gz
re3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.tar.bz2
re3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.tar.lz
re3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.tar.xz
re3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.tar.zst
re3-1795f3d47993e7a9833e6f265bb91fb6ce400f1c.zip
Diffstat (limited to '')
-rw-r--r--src/math/Vector2D.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/math/Vector2D.h b/src/math/Vector2D.h
index 1e4d698f..705ad763 100644
--- a/src/math/Vector2D.h
+++ b/src/math/Vector2D.h
@@ -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;