demo/www/lib/ionic/js/ionic.bundle.js
function getDirection(touch1, touch2) {
      var x = Math.abs(touch1.pageX - touch2.pageX),
      y = Math.abs(touch1.pageY - touch2.pageY);

      if(x >= y) {
        return touch1.pageX - touch2.pageX > 0 ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;
      }
      else {
        return touch1.pageY - touch2.pageY > 0 ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;
      }
    }
function getDirection(touch1, touch2) {
      var x = Math.abs(touch1.pageX - touch2.pageX),
      y = Math.abs(touch1.pageY - touch2.pageY);

      if(x >= y) {
        return touch1.pageX - touch2.pageX > 0 ? ionic.Gestures.DIRECTION_LEFT : ionic.Gestures.DIRECTION_RIGHT;
      }
      else {
        return touch1.pageY - touch2.pageY > 0 ? ionic.Gestures.DIRECTION_UP : ionic.Gestures.DIRECTION_DOWN;
      }
    }
function getDirection ( touch1 , touch2 ) { var x = Math . abs ( touch1 . pageX - touch2 . pageX ) , y = Math . abs ( touch1 . pageY - touch2 . pageY ) ; if ( x >= y ) { return touch1 . pageX - touch2 . pageX > 0 ? ionic . Gestures . DIRECTION_LEFT : ionic . Gestures . DIRECTION_RIGHT ; } else { return touch1 . pageY - touch2 . pageY > 0 ? ionic . Gestures . DIRECTION_UP : ionic . Gestures . DIRECTION_DOWN ; } }
angle to direction define
@param   {Touch}     touch1
@param   {Touch}     touch2
@returns {String}    direction constant, like ionic.Gestures.DIRECTION_LEFT
angle to direction define