Mega Code Archive

 
Categories / Delphi / Graphic
 

How to Determine if 3 points are collinear in 2D

Title: How to Determine if 3 points are collinear in 2D function Collinear(x1, y1, x2, y2, x3, y3: Double): Boolean; begin Result := (((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1)) = 0); end; (* End Of Collinear *)