Improve swipe detection
Merge pull request #672 from timrae/swipeAlgorithm

Improve swipe detection