import type { Point } from "../types/interface"; /** * 判断点与边界的关系 * @returns 1 在内部, 0 边界上 , -1 在外部 */ export declare function pointInPolygon(point: Point, polygon: Point[]): 1 | 0 | -1; export declare const distanceBetweenTwoPoints: (from: Point, to: Point) => number; export declare const distanceTwoHK80Points: (from: Point, to: Point) => number; /** * 计算折线(按顺序连接各点)总长度。 */ export declare const computeLineLength: (line: Point[]) => number; /** * 计算从起点指向终点的初始方位角(heading)。 * 说明: * - 基于球面大圆航线计算(WGS84 半径近似),与常见地图 SDK 的 heading 含义一致 * - 返回范围为 [-180, 180](度):0 表示正北,正值为东偏北,负值为西偏南 * - 起终点经纬完全相同返回 0 * @returns 初始方位角(度) */ export declare const computeLineAngle: (from: Point, to: Point) => number; /** * 根据指定的基线 (A -> B) 和底角 (angle),计算一个等腰三角形位于基线左侧的顶点。 * * @param A 三角形基线的起始点, 格式为 [x, y]。 * @param B 三角形基线的终点, 格式为 [x, y]。 * @param angle 等腰三角形的底角 (∠PAB) 的大小,单位为角度 (degrees)。有效范围为 (-90, 90)。 * @returns 返回计算出的顶点 P 的坐标 [x, y];如果输入无效(例如 A、B 为同一点或 angle 超出范围),则返回 null。 */ export declare const calculateLeftIsoscelesVertex: (A: Point, B: Point, angle: number) => Point; /** * 根据给定的起始点、结束点和控制点,生成二次贝塞尔曲线的模拟点。 * * @param from 起始点 * @param to 结束点 * @param controlPoint 控制点 * @param amount 要生成的模拟点的数量 * @returns 返回一个包含模拟点坐标的数组 */ export declare const createQuadraticBezierCurvePoints: (from: Point, to: Point, controlPoint: Point, amount?: number) => Point[];