diff -r 275ad81e4718 -r 68a72af636c3 hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Thu Feb 06 20:18:10 2014 +0100 +++ b/hedgewars/uFloat.pas Thu Feb 06 21:07:50 2014 +0100 @@ -84,7 +84,6 @@ function hwRound(const t: hwFloat): LongInt; inline; // Does NOT really round but returns the integer representation of the hwFloat without fractional digits. (-_0_9 -> -0, _1_5 -> _1) function hwAbs(const t: hwFloat): hwFloat; inline; // Returns the value of t with positive sign. function hwSqr(const t: hwFloat): hwFloat; inline; // Returns the square value of parameter t. -function hwPow(const t: hwFloat; p: LongWord): hwFloat; inline; // Returns the power of the value function hwSqrt1(const t: hwFloat): hwFloat; inline; // Returns the the positive square root of parameter t. function hwSqrt(const x: hwFloat): hwFloat; inline; // Returns the the positive square root of parameter t. function Distance(const dx, dy: hwFloat): hwFloat; // Returns the distance between two points in 2-dimensional space, of which the parameters are the horizontal and vertical distance. @@ -369,18 +368,6 @@ hwSqr.QWordValue:= ((QWord(t.Round) * t.Round) shl 32) + QWord(t.Round) * t.Frac * 2 + ((QWord(t.Frac) * t.Frac) shr 32); end; -function hwPow(const t: hwFloat;p: LongWord): hwFloat; -begin - hwPow:= t; - if p mod 2 = 0 then hwPow.isNegative:= false; - - while p > 0 do - begin - hwPow.QWordValue:= QWord(hwPow.Round) * t.Frac + QWord(hwPow.Frac) * t.Round + ((QWord(hwPow.Frac) * t.Frac) shr 32); - dec(p) - end -end; - function hwSqrt1(const t: hwFloat): hwFloat; const pwr = 8; // even value, feel free to adjust rThreshold = 1 shl (pwr + 32);