diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/api/Vector.py | 8 |
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):
|