Skip to content

Commit

Permalink
fix bug in check_cyclic(). Bug can be reproduced by
Browse files Browse the repository at this point in the history
angbisec_bline_cyclic
a b c = triangle; f = on_bline f b c, angle_bisector f b a c ? cyclic a b c f

Also in google-deepmind#16 (Fix incorrect tuple unpacking in check_cyclic google-deepmind#16)
  • Loading branch information
peng committed Feb 10, 2024
1 parent 996610b commit 05b34b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numericals.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def check_perp(points: list[Point]) -> bool:

def check_cyclic(points: list[Point]) -> bool:
points = list(set(points))
(a, b, c), *ps = points
(a, b, c, *ps) = points
circle = Circle(p1=a, p2=b, p3=c)
for d in ps:
if not close_enough(d.distance(circle.center), circle.radius):
Expand Down

0 comments on commit 05b34b6

Please sign in to comment.