diff -r 9dd48265e0b9 -r 237fc147950c hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Mon May 26 18:10:51 2008 +0000 +++ b/hedgewars/uFloat.pas Mon May 26 20:41:12 2008 +0000 @@ -279,7 +279,7 @@ begin hwSqr.isNegative:=false; hwSqr.QWordValue:= QWord(t.Round) * t.Frac * 2 + ((QWord(t.Frac) * t.Frac) shr 32); -hwSqr.Round:= hwSqr.Round + QWord(t.Round) * t.Round +hwSqr.Round:= hwSqr.Round + t.Round * t.Round end; function hwSqrt(const t: hwFloat): hwFloat; @@ -295,7 +295,8 @@ end else begin l:= $100000000; - r:= t.QWordValue div 2 + $80000000 // r:= t / 2 + 0.5 + r:= t.QWordValue div 2 + $80000000; // r:= t / 2 + 0.5 + if r > $FFFFFFFFFFFF then r:= $FFFFFFFFFFFF end; repeat