Mega Code Archive

 
Categories / Delphi / Graphic
 

How to Determine if two 2D segments are parallel

Title: How to Determine if two 2D segments are parallel unction SegmentsParallel(x1, y1, x2, y2, x3, y3, x4, y4: Double): Boolean; begin Result := (((y1 - y2) * (x1 - x2)) = ((y3 - y4) * (x3 - x4))); end; (* End Of SegmentsParallel *)