Swipe behaviour & direction detector helpers.