hedgewars/uFloat.pas
changeset 7515 8957b05d368a
parent 7043 7c080e5ac8d0
child 7593 b966e2d833f2
equal deleted inserted replaced
7513:39866eb9e4a6 7515:8957b05d368a
   367 end;
   367 end;
   368 
   368 
   369 function hwPow(const t: hwFloat;p: LongWord): hwFloat;
   369 function hwPow(const t: hwFloat;p: LongWord): hwFloat;
   370 begin
   370 begin
   371 hwPow:= t;
   371 hwPow:= t;
   372 if p mod 2 = 0 then hwPow.isNegative:= t.isNegative;
   372 if p mod 2 = 0 then hwPow.isNegative:= false;
   373 
   373 
   374 while p > 0 do
   374 while p > 0 do
   375     begin
   375     begin
   376     hwPow.QWordValue:= QWord(hwPow.Round) * t.Frac + QWord(hwPow.Frac) * t.Round + ((QWord(hwPow.Frac) * t.Frac) shr 32);
   376     hwPow.QWordValue:= QWord(hwPow.Round) * t.Frac + QWord(hwPow.Frac) * t.Round + ((QWord(hwPow.Frac) * t.Frac) shr 32);
   377     dec(p)
   377     dec(p)