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 553cbd44db - Show all commits

View File

@ -360,16 +360,16 @@ export const calculateIntersection = (line1, line2) => {
// Check if the intersection X and Y are within the range of both lines
if (
result[0] >= line1MinX &&
result[0] <= line1MaxX &&
result[0] >= line2MinX &&
result[0] <= line2MaxX &&
result[1] >= line1MinY &&
result[1] <= line1MaxY &&
result[1] >= line2MinY &&
result[1] <= line2MaxY
result[0] >= line1MinX - 1 &&
result[0] <= line1MaxX + 1 &&
result[0] >= line2MinX - 1 &&
result[0] <= line2MaxX + 1 &&
result[1] >= line1MinY - 1 &&
result[1] <= line1MaxY + 1 &&
result[1] >= line2MinY - 1 &&
result[1] <= line2MaxY + 1
) {
return { x: Math.round(result[0]), y: Math.round(result[1]) }
return { x: result[0], y: result[1] }
} else {
return null // Intersection is out of range
}