feature/jaeyoung #46

Merged
LEE_JAEYOUNG merged 58 commits from feature/jaeyoung into dev 2025-05-21 13:53:44 +09:00
Showing only changes of commit 902d13b273 - Show all commits

View File

@ -533,7 +533,7 @@ export function isPointOnLine({ x1, y1, x2, y2 }, { x, y }, epsilon = 2) {
return result <= 10*!*/
// 직선 방정식 만족 여부 확인
const crossProduct = (y - y1) * (x2 - x1) - (x - x1) * (y2 - y1)
if (Math.abs(crossProduct) > 10) return false // 작은 오차 허용
if (Math.abs(crossProduct) > 500) return false // 작은 오차 허용
// 점이 선분의 범위 내에 있는지 확인
const withinXRange = Math.min(x1, x2) <= x && x <= Math.max(x1, x2)