开发:优化代码,因为点必定在多边形下面

pull/2536/MERGE
ChenX 9 months ago
parent 1ccc846728
commit 215e45b3be

@ -444,8 +444,9 @@ function IsPointInPolygon(polyPts: Vector2[], pt: Vector3): number[]
// return false;
//点位于线上面
if (pt.y > Math.max(sp.y, ep.y))
continue;
// if (pt.y > Math.max(sp.y, ep.y))
// continue;
//线垂直Y轴
let derX = ep.x - sp.x;
if (equaln(derX, 0, 5e-6))

Loading…
Cancel
Save