Docs: Update benchmark results

This commit is contained in:
github-actions[bot]
2025-11-18 17:37:06 +00:00
parent 39d057f079
commit afcfd09537
84 changed files with 1086 additions and 1088 deletions

View File

@@ -0,0 +1,22 @@
const findConvexHull = async (pts) => {
const { default: _ } = await import('https://cdn.skypack.dev/lodash');
const P = _.sortBy(_.uniqWith(pts, _.isEqual), ['x', 'y']);
const n = P.length, k = [], C = (a, b, c) => (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
if (n < 3) return P;
for (let i = 0; i < n; i++) {
while (k.length >= 2 && C(k[k.length - 2], k[k.length - 1], P[i]) <= 0) k.pop();
k.push(P[i]);
}
for (let i = n - 2, t = k.length + 1; i >= 0; i--) {
while (k.length >= t && C(k[k.length - 2], k[k.length - 1], P[i]) <= 0) k.pop();
k.push(P[i]);
}
k.pop();
return k;
};
export default findConvexHull;