title: Draw an infinite line through 2 points?
body: <p>I'm looking for a way to draw an infinite line (a line with no end, also known as a ray) through 2 points. I can draw a line between 2 points with Line2D, no problem here. </p>
  
  <p>Next the infinite part needed a look. With my simple mind I thought, lets multiply the x and y coordinates from the second point with 100 and redraw the line. This works, but only in simple cases.</p>
  
  <p>For example here is a case in which it produces lines with different angles:</p>
  
  <pre><code>    g.setColor(Color.red);
      g2.setStroke(new BasicStroke(4.0f));
      g2.draw(new Line2D.Double(0, 61.632653061218946, 944, 217.25510204080692));
      g.setColor(Color.blue);
      g2.setStroke(new BasicStroke(1.0f));
      g2.draw(new Line2D.Double(0, 61.632653061218946, 944*10, 217.25510204080692*10));
  </code></pre>
  
  <p>This will first draw a fat red line, next it will draw a blue thin line.</p>
  
  <p>The blue line has a different angle compared the the red line. Here's a screenshot to illustrate this effect:</p>
  
  <p><img src="https://i.stack.imgur.com/lNTNv.gif" alt="enter image description here"></p>
  
  <p>Does somebody know a way to fix this, or maybe a better way to draw a infinite line through 2 points?</p>