hedgewars/uMisc.pas
changeset 438 04bcc3fb127a
parent 433 9f8f22094c0e
child 488 4dee644f382d
equal deleted inserted replaced
437:933ed65b55d1 438:04bcc3fb127a
   194 begin
   194 begin
   195 dY:= _dY.QWordValue / $100000000;
   195 dY:= _dY.QWordValue / $100000000;
   196 if _dY.isNegative then dY:= - dY;
   196 if _dY.isNegative then dY:= - dY;
   197 dX:= _dX.QWordValue / $100000000;
   197 dX:= _dX.QWordValue / $100000000;
   198 if _dX.isNegative then dX:= - dX;
   198 if _dX.isNegative then dX:= - dX;
   199 DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI) mod cMaxAngle
   199 DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI)
   200 end;
   200 end;
   201 
   201 
   202 procedure SetKB(n: Longword);
   202 procedure SetKB(n: Longword);
   203 begin
   203 begin
   204 KBnum:= n
   204 KBnum:= n