...determine if two 2D segments are perpendicular?

Author: Arash Partow
Homepage: http://www.partow.net

Category: Math

function SegmentsPerpendicular(x1, y1, x2, y2, x3, y3, x4, y4: Double): Boolean;
begin
  
Result := (((y2 - y1) * (x3 - x4)) = ((y4 - y3) * (x2 - x1) * -1));
end;
(* End Of SegmentsPerpendicular *)


// vérifie si 2 droites bidimensionnelles sont perpendiculaires

 

printed from
www.swissdelphicenter.ch
developers knowledge base