mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 15:39:42 +08:00
Fixes: #413 Implemented Convex Hull using Graham Scan
This commit is contained in:
@ -18,7 +18,7 @@ function orientation (a, b, c) {
|
||||
|
||||
// Clockwise
|
||||
if (alpha > beta) return 1
|
||||
// Anticlockwise
|
||||
// Anticlockwise
|
||||
else if (beta > alpha) return -1
|
||||
// Colinear
|
||||
return 0
|
||||
@ -79,4 +79,4 @@ const points = [
|
||||
{ x: 3, y: 1 },
|
||||
{ x: 3, y: 3 }]
|
||||
|
||||
convexHull(points)
|
||||
convexHull(points);
|
||||
|
Reference in New Issue
Block a user