title: 3 points are collinear in 2d
body: <p>I am trying to verify when 3 points (double) are collinear in 2-D. I have found
  different Pascal functions that return true if this is verified; those functions use integer to specify X and Y coordinates. I need a more precise calculation
  at least to the first 3 digits of the decimal part of X and Y expressed 
  as double type. Who can help me with this?</p>
  
  <p>I found this function:</p>
  
  <pre><code>function Collinear(x1, y1, x2, y2, x3, y3: Double): Boolean;
  begin
    Result := (((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) = 0);
  end;
  </code></pre>
  
  <p>But I guess the calculation would never be 0. Should I use something like that?</p>
  
  <pre><code>function Collinear(x1, y1, x2, y2, x3, y3: Double): Boolean;
  begin
    Result := (((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) &lt; 0.01);
  end;
  </code></pre>