import type { Point } from '../../types';

/**
 * 计算线段长度
 */
export function lineLen([x1, y1]: Point, [x2, y2]: Point) {
  return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5;
}
