Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2014-01-20 13:07:03 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2014-01-20 13:07:03 (GMT)
commit82c9610e55aa9925b1dbde1b8ca29941d5b0b424 (patch)
treec9e3dd07f7a687a9c583ea70794dc934cd6c8a93
parent32716d3cb38cf72a925bc997174d3e7ae2d7bce9 (diff)
magnitude of vector is calculated
-rw-r--r--src/api/Vector.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/Vector.py b/src/api/Vector.py
index 64a9703..523d04d 100644
--- a/src/api/Vector.py
+++ b/src/api/Vector.py
@@ -78,12 +78,12 @@ class CVector(object):
# Normalizes the vector. The vector will have a magnitude of 1.
def normalize(self):
- self.m = self.magnitude();
+ m = self.magnitude();
# Check division by zero.
- if (self.m > self.EPSILON):
- self.x /= self.m;
- self.y /= self.m;
+ if (m > self.EPSILON):
+ self.x /= m;
+ self.y /= m;
# Truncates the vector assuring that the magnitude not exceed the limit.
def truncate(self, aLength):