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 36e2b16 commit 914e525Copy full SHA for 914e525
Geometry/ConvexHullGraham.js
@@ -13,10 +13,10 @@ function compare(a, b) {
13
return 1
14
}
15
function orientation(a, b, c) {
16
- const crossProduct = (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y);
+ const crossProduct = (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y)
17
18
- if(crossProduct === 0) return 0;
19
- return (crossProduct > 0) ? 1 : -1;
+ if (crossProduct === 0) return 0
+ return crossProduct > 0 ? 1 : -1
20
21
22
function convexHull(points) {
0 commit comments