Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ran prettier
  • Loading branch information
Haarush2006 committed Oct 23, 2025
commit 914e52552310722a240832b827b3b4b19b5ac841
6 changes: 3 additions & 3 deletions Geometry/ConvexHullGraham.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ function compare(a, b) {
return 1
}
function orientation(a, b, c) {
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)

if(crossProduct === 0) return 0;
return (crossProduct > 0) ? 1 : -1;
if (crossProduct === 0) return 0
return crossProduct > 0 ? 1 : -1
}

function convexHull(points) {
Expand Down