hedgewars/uFloat.pas
changeset 7715 8b653edac2a2
parent 7714 981001b84f0b
child 8026 4a4f21070479
child 8838 aa2ffd427f6a
equal deleted inserted replaced
7714:981001b84f0b 7715:8b653edac2a2
   587 else
   587 else
   588     AngleCos.QWordValue:= SinTable[Angle - 1024]
   588     AngleCos.QWordValue:= SinTable[Angle - 1024]
   589 end;
   589 end;
   590 
   590 
   591 function vector2Angle(const x, y: hwFloat): LongInt;
   591 function vector2Angle(const x, y: hwFloat): LongInt;
   592 var d: hwFloat;
   592 var d, nf: hwFloat;
   593     l, r, c, oc: Longword;
   593     l, r, c, oc: Longword;
   594     n: QWord;
   594     n: QWord;
   595 begin
   595 begin
   596     d:= _1 / Distance(x, y);
   596     d:= _1 / Distance(x, y);
   597 
   597 
   598     n:= (y * d).QWordValue;
   598     nf:= y * d;
       
   599     n:= nf.QWordValue;
   599 
   600 
   600     l:= 0;
   601     l:= 0;
   601     r:= 1024;
   602     r:= 1024;
   602     c:= 0;
   603     c:= 0;
   603 
   604