UNPKG

@fleet-frontend/mower-maps

Version:

a mower maps in google maps

44 lines 1.72 kB
import { Point } from '../types/utils'; /** * 转换点格式,为坐标点添加缩放因子 * 保持原数组格式,只对前两个元素(x, y 坐标)应用缩放因子 * 支持二维或三维数组 [x, y] 或 [x, y, other] */ export declare function convertPointsFormat(points?: number[][]): number[][] | null; /** * 转换位置格式从 [number, number] 到 {x: number, y: number} * 添加缩放因子将米转换为像素 */ export declare function convertPositionFormat(position?: [number, number]): Point | null; /** * 转换单个坐标点 */ export declare function convertCoordinate(x: number, y: number): Point; /** * @param x x坐标 * @param y y坐标 * @param isAllowInBoundary 是否允许点在边界上的判断 * @return ture-点在边界上即可视为在边界内,false-严格判断点在边界内 */ export declare function isPointIn(x: number, y: number, pointList: Point[], isAllowInBoundary: boolean): boolean; /** * 用于判断三个点的方向的辅助方法 */ export declare function orientation(p: Point, q: Point, r: Point): 1 | 2 | 0; /** * 检查点q是否在线段pr上的辅助方法 */ export declare function onSegment(p: Point, q: Point, r: Point): boolean; /** * 判断两条线段是否相交的方法 */ export declare function doTwoLinesIntersect(p1: Point, q1: Point, p2: Point, q2: Point): boolean; /** * 判断多点折线是否相交 */ export declare function doIntersect(points1: Point[], points2: Point[]): boolean; /** * 两个图形是否完全分离,互相不包含 */ export declare function isOutsideToEachOther(points1: Point[], points2: Point[]): boolean; //# sourceMappingURL=coordinates.d.ts.map