feat:提交

This commit is contained in:
2025-07-22 18:22:31 +08:00
parent 160bb294ca
commit 2ebb3e1abe
85 changed files with 36380 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import convexHull from 'monotone-convex-hull-2d'
import type { Point } from '../common/Vector2'
export function ConvexHull2D(points: Point[]): Point[]
{
let pts = points.map(p => [p.x, p.y])
let indexs: number[] = convexHull(pts)
return indexs.map(i => points[i])
}