"use strict";

exports.__esModule = true;
exports.hasExceededDistance = hasExceededDistance;
function hasExceededDistance({
  delta,
  measurement,
  axis = 'all'
}) {
  const dx = Math.abs(delta.x);
  const dy = Math.abs(delta.y);
  switch (axis) {
    case 'y':
      return dy > measurement;
    case 'x':
      return dx > measurement;
    case 'all':
    default:
      return Math.sqrt(dx ** 2 + dy ** 2) > measurement;
  }
}
//# sourceMappingURL=hasExceededDistance.js.map