export function hasExceededDistance({
  delta,
  measurement,
  axis = 'all',
}: {
  delta: { x: number; y: number };
  measurement: number;
  axis?: 'x' | 'y' | 'all';
}): boolean {
  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;
  }
}
