diff --git a/basictypes.py b/basictypes.py index 281401d..1b40907 100644 --- a/basictypes.py +++ b/basictypes.py @@ -93,7 +93,7 @@ class StraightLine: def intercept(self, line) -> Point: # Basically when the two lines have the same cords (x,y) # As a formula x = (b2 - b1)/ (m1 + m2) to find X, then apply y = mx + b on any line - x = (line.get_b() - self.get_b()) / (line.get_m() + line.get_m()) + x = (line.get_b() - self.get_b()) / (line.get_m() + self.get_m()) y = self.get_m()*x + self.get_b() # Inline to reduce overhead return Point(x, y)