We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 726cb79 commit a105da7Copy full SHA for a105da7
contents/graham_scan/code/nim/graham.nim
@@ -9,7 +9,7 @@ proc tup_to_point[T](t: (T, T)): Point[T] =
9
(x: t[0], y: t[1])
10
11
proc is_counter_clockwise(p1, p2, p3: Point): bool =
12
- (p3.y - p1.y) * (p2.x - p1.x) >= (p2.y - p1.y) * (p3.x - p1.x)
+ (p3.y - p1.y) * (p2.x - p1.x) < (p2.y - p1.y) * (p3.x - p1.x)
13
14
proc polar_angle(reference, point: Point): float =
15
arctan2(float(point.y - reference.y), float(point.x - reference.x))
0 commit comments