hedgewars/uFloat.pas
changeset 2948 3f21a9dc93d0
parent 2933 02af54eb7e1e
child 2955 fb361d137524
equal deleted inserted replaced
2947:803b277e4894 2948:3f21a9dc93d0
   289 
   289 
   290 function hwSqr(const t: hwFloat): hwFloat;
   290 function hwSqr(const t: hwFloat): hwFloat;
   291 begin
   291 begin
   292 hwSqr.isNegative:= false;
   292 hwSqr.isNegative:= false;
   293 hwSqr.QWordValue:=
   293 hwSqr.QWordValue:=
   294 	  ((QWord(t.Round) * t.Round) shl 32)
   294       ((QWord(t.Round) * t.Round) shl 32)
   295 	+ QWord(t.Round) * t.Frac * 2
   295     + QWord(t.Round) * t.Frac * 2
   296 	+ ((QWord(t.Frac) * t.Frac) shr 32);
   296     + ((QWord(t.Frac) * t.Frac) shr 32);
   297 end;
   297 end;
   298 
   298 
   299 function hwSqrt(const t: hwFloat): hwFloat;
   299 function hwSqrt(const t: hwFloat): hwFloat;
   300 var l, r: QWord;
   300 var l, r: QWord;
   301     c: hwFloat;
   301     c: hwFloat;