hedgewars/uTouch.pas
changeset 6704 77c93096d055
parent 6703 abe2abfe9de2
child 6705 d2e95dcf2bb0
--- a/hedgewars/uTouch.pas	Fri Feb 17 22:53:02 2012 +0100
+++ b/hedgewars/uTouch.pas	Fri Feb 17 22:54:45 2012 +0100
@@ -22,7 +22,7 @@
 
 interface
 
-uses sysutils, math, uConsole, uVariables, SDLh, uFloat, uConsts, uIO, GLUnit, uTypes;
+uses sysutils, uConsole, uVariables, SDLh, uFloat, uConsts, uIO, GLUnit, uTypes;
 
 
 procedure initModule;
@@ -527,7 +527,7 @@
 //Method to calculate the distance this finger has moved since the downEvent
 function fingerHasMoved(finger: TTouch_Data): boolean;
 begin
-    fingerHasMoved := trunc(sqrt(Power(finger.X-finger.historicalX,2) + Power(finger.y-finger.historicalY, 2))) > 330;
+    fingerHasMoved := trunc(sqrt(sqr(finger.X-finger.historicalX) + sqr(finger.y-finger.historicalY))) > 330;
 end;
 
 function calculateDelta(finger1, finger2: TTouch_Data): LongInt; inline;