hedgewars/uFloat.pas
changeset 856 beecc5c5c71c
parent 835 6f567934cc44
child 883 07a568ba44e0
equal deleted inserted replaced
855:8842c71d16bf 856:beecc5c5c71c
   311 Distance:= hwSqrt(hwSqr(dx) + hwSqr(dy))
   311 Distance:= hwSqrt(hwSqr(dx) + hwSqr(dy))
   312 end;
   312 end;
   313 
   313 
   314 function DistanceI(const dx, dy: LongInt): hwFloat;
   314 function DistanceI(const dx, dy: LongInt): hwFloat;
   315 begin
   315 begin
   316 DistanceI:= Distance(int2hwFloat(dx), int2hwFloat(dy))
   316 DistanceI:= hwSqrt(int2hwFloat(sqr(dx) + sqr(dy)))
   317 end;
   317 end;
   318 
   318 
   319 function SignAs(const num, signum: hwFloat): hwFloat;
   319 function SignAs(const num, signum: hwFloat): hwFloat;
   320 begin
   320 begin
   321 SignAs:= num;
   321 SignAs.QWordValue:= num.QWordValue;
   322 SignAs.isNegative:= signum.isNegative
   322 SignAs.isNegative:= signum.isNegative
   323 end;
   323 end;
   324 
   324 
   325 {$INCLUDE SinTable.inc}
   325 {$INCLUDE SinTable.inc}
   326 
   326