calculate swipe on interval