interface SimplifyOptions { /** 简化容差值,默认为1.0 */ tolerance?: number; /** 是否保留最高精度,当设置为true时将使用更精确的距离计算 */ highQuality?: boolean; } /** * 对坐标序列进行 Douglas-Peucker 算法简化 * * @param coords - 坐标数组,格式为 [x, y, x, y, x, y, ...] 或 [[x, y], [x, y], ...] * @param options - 简化选项 * @returns 简化后的坐标数组,格式与输入相同 * * @example * ```ts * // 使用坐标数组 * const points = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]; * const simplified = simplify(points, { tolerance: 1.0 }); * * // 使用坐标对数组 * const pointPairs = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]; * const simplifiedPairs = simplify(pointPairs, { tolerance: 1.0 }); * ``` */ declare function simplify(coords: Float32Array | number[] | [number, number][], options?: SimplifyOptions): Float32Array | number[] | [number, number][]; export { simplify };