주석 수정
This commit is contained in:
parent
c52d914c6e
commit
7bf548de2b
@ -311,8 +311,7 @@ export function removeDuplicatePolygons(polygons) {
|
|||||||
return uniquePolygons
|
return uniquePolygons
|
||||||
}
|
}
|
||||||
|
|
||||||
// 현재 point의 x와 이전 포인트의 x와 같을경우, 다음 포인트의 x와 달라야 함.
|
// 같은 직선상에 있는지 확인 같은 직선이라면 polygon을 생성할 수 없으므로 false
|
||||||
// 현재 point의 y와 이전 포인트의 y와 같을경우, 다음 포인트의 y와 달라야 함.
|
|
||||||
const isValidPoints = (points) => {
|
const isValidPoints = (points) => {
|
||||||
function isColinear(p1, p2, p3) {
|
function isColinear(p1, p2, p3) {
|
||||||
return (p2.x - p1.x) * (p3.y - p1.y) === (p3.x - p1.x) * (p2.y - p1.y)
|
return (p2.x - p1.x) * (p3.y - p1.y) === (p3.x - p1.x) * (p2.y - p1.y)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user