anchor.diff:    w:=A.Y; A.Y:=B.Y; B.Y:=w;
   end;
   
  +
   end.
  
positive.code: 
  function KMStepIsDiag(P1,P2:TKMPoint):boolean;
  begin
    Result := ((sign(P2.X-P1.X) <> 0) and
               (sign(P2.Y-P1.Y) <> 0));
  end;
  
  
  
negative.code: function GetLength(A,B:TKMPointF): single; overload;
  begin
    Result := sqrt(sqr(A.x-B.x) + sqr(A.y-B.y));
  end;
  
  
  