title: Collision detection of 2 lines in java (Android)
body: <p>Very simple question.
  How do you achieve collision detection with lines drawn in Java? Just lines. No rectangles, circles or images, bitmaps.. just lines.</p>
  
  <p>By the way these lines are not straight. They are built of hundreds of very small lines that represent movement of a player (their gps coords as they move), so they meander all over the place as the player moves. All the lines are connected. The end point of one line is the beginning point of the next and so on. It is an unbroken line in this respect. There are no gaps.</p>
  
  <p>I tried storing the x,y values of the beginning points of the lines in an array and then iterated through this array to determine whether the point has been visited before. This is fine if the player visits the exact coords again, but what if he is in a place half way between these recorded points?</p>
  
  <p>This is the background to the problem if it helps. But the main question is my focus here.
  How do you achieve collision detection of lines in Java?</p>