hedgewars/uFloat.pas
changeset 856 beecc5c5c71c
parent 835 6f567934cc44
child 883 07a568ba44e0
--- a/hedgewars/uFloat.pas	Mon Apr 21 18:43:07 2008 +0000
+++ b/hedgewars/uFloat.pas	Tue Apr 22 12:40:43 2008 +0000
@@ -313,12 +313,12 @@
 
 function DistanceI(const dx, dy: LongInt): hwFloat;
 begin
-DistanceI:= Distance(int2hwFloat(dx), int2hwFloat(dy))
+DistanceI:= hwSqrt(int2hwFloat(sqr(dx) + sqr(dy)))
 end;
 
 function SignAs(const num, signum: hwFloat): hwFloat;
 begin
-SignAs:= num;
+SignAs.QWordValue:= num.QWordValue;
 SignAs.isNegative:= signum.isNegative
 end;