Skip to content

Commit cbb0a52

Browse files
Spheniscineadamant-pwn
authored andcommitted
Update convex-hull.md
Clarify tie-breaking for points with same polar angle
1 parent eb930c6 commit cbb0a52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/geometry/convex-hull.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ with the same Y coordinate, the one with the smaller X coordinate is considered.
2323
step takes $\mathcal{O}(N)$ time.
2424

2525
Next, all the other points are sorted by polar angle in clockwise order.
26-
If the polar angle between two points is the same, the nearest point is chosen instead.
26+
If the polar angle between two or more points is the same, the tie should be broken by distance from $P_0$, in increasing order.
2727

2828
Then we iterate through each point one by one, and make sure that the current
2929
point and the two before it make a clockwise turn, otherwise the previous

0 commit comments

Comments
 (0)