psalaets/line-intersect

point data is not returned even though type is intersecting

obara-cct opened this issue · 3 comments

I used checkIntersection API and got the result with type="intersecting".
I expected that return object include point data but didnt as shown below image.
May I know why how I can get intersection point from checkIntersection API?
無題

That looks like a bug.

Are you able to show your code so I can see how you are calling checkIntersection?

If not, do you remember what values were passed to checkIntersection that caused this to happen?

Is following code enough for you to debug?

const intersectResult=checkIntersection(lineA.p1[0],lineA.p1[1],lineA.p2[0],lineA.p2[1],lineB.p1[0],lineB.p1[1],lineB.p2[0],lineB.p2[1]);
console.log('intersectResult',intersectResult);

Hmm everything looks correct there.

Can you print out lineA and lineB with console.log() and show me what values are being passed into the function?