# HG changeset patch # User Xeli # Date 1329515685 -3600 # Node ID 77c93096d0559168e0f2d1b24c5869b33a38c623 # Parent abe2abfe9de251f218c2ec3fa6d6921399635cef change power() to sqr diff -r abe2abfe9de2 -r 77c93096d055 hedgewars/uTouch.pas --- 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;