Closed sonygod closed 1 year ago
Tests whether parallel lines intersect fail.
Line2<float_t> line2_5({0.0, 0.0}, {1.0, 0.0});
Line2<float_t> line2_6({0.0, 1.0}, {1.0, 1.0});
IntrPointLine2AndLine2<float_t> intrLine2AndLine2_2;
auto result7 = intrLine2AndLine2_2(line2_5, line2_6);
assert(result7.intersect == false);
Hello, I'm not sure, but I think the line2 objects are not defined by 2 points, but 1 point + direction unit vector. (distance between the two points must be "1")
So... If your lines are not well defined, ofc the result is bad...
(this is just my opinion)
Le sam. 3 déc. 2022 à 09:16, Mr zhan @.***> a écrit :
Tests whether parallel lines intersect fail.
Line2
line2_5({0.0, 0.0}, {1.0, 0.0}); Line2<float_t> line2_6({0.0, 1.0}, {1.0, 1.0}); IntrPointLine2AndLine2<float_t> intrLine2AndLine2_2; auto result7 = intrLine2AndLine2_2(line2_5, line2_6); assert(result7.intersect == false);
— Reply to this email directly, view it on GitHub https://github.com/davideberly/GeometricTools/issues/49#issuecomment-1336111607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3BAQMFLKEP2CKTMTYXOJDWLL6W3ANCNFSM6AAAAAASSTTRD4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
thanks, yes, line 2 is defined by 1 point and direction instead of two points.
the result point should be [2.0,2.0] but got [-2.0,-2.0]