summaryrefslogtreecommitdiffstats
path: root/src/math/Vector2D.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/Vector2D.h')
-rw-r--r--src/math/Vector2D.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/math/Vector2D.h b/src/math/Vector2D.h
index 0235dbe5..deabd0b1 100644
--- a/src/math/Vector2D.h
+++ b/src/math/Vector2D.h
@@ -13,14 +13,6 @@ public:
void Normalise(void) {
float sq = MagnitudeSqr();
- // assert(sq != 0.0f); // just be safe here
- float invsqrt = RecipSqrt(sq);
- x *= invsqrt;
- y *= invsqrt;
- }
-
- void NormaliseSafe(void) {
- float sq = MagnitudeSqr();
if(sq > 0.0f){
float invsqrt = RecipSqrt(sq);
x *= invsqrt;
@@ -61,6 +53,9 @@ public:
CVector2D operator/(float t) const {
return CVector2D(x/t, y/t);
}
+ CVector2D operator-() const {
+ return CVector2D(-x, -y);
+ }
};
inline float