diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2014-02-20 18:00:08 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2014-02-20 18:00:08 (GMT) |
commit | 92f75cd1693fcde3cce2a1ad44d09ebee480d12c (patch) | |
tree | 53ac7cdccadf9b2da82ac58bd4fa5265fb3a1d69 | |
parent | 85c11c0a88af436de3c19b61d80848dac0ff316a (diff) |
only import specific functions
-rw-r--r-- | src/api/Vector.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/Vector.py b/src/api/Vector.py index 523d04d..73a3055 100644 --- a/src/api/Vector.py +++ b/src/api/Vector.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*-
-import math
from math import cos
from math import sin
+from math import sqrt
class CVector(object):
@@ -71,7 +71,7 @@ class CVector(object): # Returns the magnitude of the vector.
def magnitude(self):
- return math.sqrt(self.x * self.x + self.y * self.y)
+ return sqrt(self.x * self.x + self.y * self.y)
def magnitudeSquared(self):
return (self.x * self.x + self.y * self.y)
|