We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e013920 commit ef7b1dfCopy full SHA for ef7b1df
lgsvl/geometry.py
@@ -3,6 +3,7 @@
3
#
4
# This software contains code licensed as described in LICENSE.
5
6
+from math import sqrt
7
8
class Vector:
9
def __init__(self, x = 0.0, y = 0.0, z = 0.0):
@@ -47,6 +48,9 @@ def __mul__(self, v):
47
48
def __rmul__(self, v):
49
return self * v
50
51
+ def magnitude(self):
52
+ return sqrt(self.x**2 + self.y**2 + self.z**2)
53
+
54
class BoundingBox:
55
def __init__(self, min, max):
56
self.min = min
0 commit comments