Graphic Delphi

Title: determine if two 2D segments are perpendicular?
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