# Checking if two lines are crossing [duplicate]

How can I check if two lines (created with function love.graphics.line) are crossing themselves? I may use this ability to create procedural maps via graphs.

• This question does not appear to be about game development within the scope defined in the help center. See gamedev.stackexchange.com/questions/63295/… – MrCranky Jan 22 '14 at 12:49
• @MrCranky I think this is not directly game dev related. But line intersection is a common geometry problem. To some extent we accept graphics, geometry, math and physics questions. meta.gamedev.stackexchange.com/questions/1419/… – concept3d Jan 22 '14 at 12:57
• I was going on the basis that we closed an almost identical line-intersection problem (the one I linked to) as off-topic, including a comment suggesting it was better served on math.stackexchange. Even if it's on topic, it's most certainly a duplicate. – MrCranky Jan 22 '14 at 13:07
• I agree it's a duplicate. – concept3d Jan 22 '14 at 13:15
• This page lists code snippets for Love2D on general math functions such as finding the point of intersection between two lines: love2d.org/wiki/General_math – congusbongus Jan 23 '14 at 0:08