diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2011-01-03 22:37:32 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2011-01-03 22:37:32 (GMT) |
commit | 51960ad671cea118e2590a74dffe97fd56a25f99 (patch) | |
tree | 8ce6886450039f9249233f9c37706f3931d9aa1d /src/net/hoopajoo/android/SoftKeys/InputSmoother.java | |
parent | 16be5a5acadac318118ade0b74ae637872ec6b91 (diff) | |
download | SoftKeys-51960ad671cea118e2590a74dffe97fd56a25f99.zip SoftKeys-51960ad671cea118e2590a74dffe97fd56a25f99.tar.gz SoftKeys-51960ad671cea118e2590a74dffe97fd56a25f99.tar.bz2 |
Repost the new calc coords after ending touch event in case it jittered out
of place
Diffstat (limited to 'src/net/hoopajoo/android/SoftKeys/InputSmoother.java')
-rw-r--r-- | src/net/hoopajoo/android/SoftKeys/InputSmoother.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/InputSmoother.java b/src/net/hoopajoo/android/SoftKeys/InputSmoother.java index 1aba4f6..3668181 100644 --- a/src/net/hoopajoo/android/SoftKeys/InputSmoother.java +++ b/src/net/hoopajoo/android/SoftKeys/InputSmoother.java @@ -54,17 +54,17 @@ public class InputSmoother { p.outlier = false; } - // currently this just checks to see if we delta'd farther than 10 pixels, + // currently this just checks to see if we delta'd farther than 100 pixels, // it would be nice to add something smarter like curve fitting someday // but it probably doesn't matter int lastx = mPoints.get( 0 ).x; int lasty = mPoints.get( 0 ).y; for( PointCheck p : mPoints ) { - if( Math.abs( lastx - p.x ) > 10 ) { + if( Math.abs( lastx - p.x ) > 100 ) { p.outlier = true; } - if( Math.abs( lasty - p.y ) > 10 ) { + if( Math.abs( lasty - p.y ) > 100 ) { p.outlier = true; } lastx = p.x; |