From 4c4366a5d15687b684af9596c33b7a2ce93c9795 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 14 Feb 2022 15:03:26 +0300 Subject: [PATCH] StraightLine: fixed typo while referencing line get_m() Signed-off-by: HeshamTB --- basictypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)