Skip to content

Commit 0f434fa

Browse files
committed
Fix inconsistency with solve_bisect
1 parent 5170088 commit 0f434fa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

coloraide/algebra.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,10 @@ def solve_bisect(
304304
high = t
305305
else:
306306
low = t
307-
t = (high + low) * 0.5
308307

309-
if math.isclose(low, high, rel_tol=rtol, abs_tol=atol): # pragma: no cover
310-
break
308+
t = (high + low) * 0.5
311309

312-
return t, abs(x) < atol # pragma: no cover
310+
return t, math.isclose(x, 0, rel_tol=rtol, abs_tol=atol) # pragma: no cover
313311

314312

315313
def _solve_quadratic(poly: Vector) -> Vector:

0 commit comments

Comments
 (0)