From 457f5d17032fb4d6bda7989e651aad450c4a66a6 Mon Sep 17 00:00:00 2001 From: Michael Whittaker Date: Wed, 31 Mar 2021 12:34:55 -0700 Subject: [PATCH] Fixed mistyped method. The type error was pointed out by @adsharma in #4. --- quoracle/geometry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quoracle/geometry.py b/quoracle/geometry.py index 246dc48..06d3db8 100644 --- a/quoracle/geometry.py +++ b/quoracle/geometry.py @@ -33,11 +33,11 @@ class Segment: assert self.l.x <= x <= self.r.x return self.slope() * (x - self.l.x) + self.l.y - def approximately_equal(self, other: 'Segment') -> float: + def approximately_equal(self, other: 'Segment') -> bool: return (math.isclose(self.l.y, other.l.y, rel_tol=1e-5) and math.isclose(self.r.y, other.r.y, rel_tol=1e-5)) - def compatible(self, other: 'Segment') -> float: + def compatible(self, other: 'Segment') -> bool: return self.l.x == other.l.x and self.r.x == other.r.x def slope(self) -> float: