/** * L distance between a pair of vectors * * @description * Identical but much faster than `lDist(l)([fromX, fromY], [toX, toY])` * * @param l - Defines the Lp space */ export declare const lPointDist: (l: number) => (fromX: number, fromY: number, toX: number, toY: number) => number; /** * L1 distance between a pair of points * * @description * Identical but much faster than `l1Dist([fromX, fromY], [toX, toY])` * * @param fromX - X coordinate of the first point * @param fromY - Y coordinate of the first point * @param toX - X coordinate of the second point * @param toY - Y coordinate of the first point * @return L1 distance */ export declare const l1PointDist: (fromX: number, fromY: number, toX: number, toY: number) => number; /** * L2 distance between a pair of points * * @description * Identical but much faster than `l2Dist([fromX, fromY], [toX, toY])` * * @paramfromX - X coordinate of the first point * @paramfromY - Y coordinate of the first point * @paramtoX - X coordinate of the second point * @paramtoY - Y coordinate of the first point * @returnL2 distance */ export declare const l2PointDist: (fromX: number, fromY: number, toX: number, toY: number) => number; interface BBox { minX: number; maxX: number; minY: number; maxY: number; } /** * L distance between a pair of rectangles * * @param l - Defines the Lp space */ export declare const lRectDist: (l: number) => (bBox1: BBox, bBox2: BBox) => number; /** * From: https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html * @param point - The point defined as a tuple of [x, y] * coordinates. * @param polygon - 1D list of vertices defining the polygon. * @return If `true` point lies within the polygon. */ export declare const isPointInPolygon: ([px, py]: [number, number], polygon: number[]) => boolean; /** * Check if a 2D or 1D point is within a rectangle or range * @param point - The point defined as a tuple of [x, y] * coordinates. * @param rectangle - The rectangle defined * as a quadruple of [minX, maxX, minY, maxY] coordinates. * @return If `true` the [x,y] point is in the rectangle. */ export declare const isPointInRect: ([x, y]: [number, number], [minX, maxX, minY, maxY]: [number, number, number, number]) => boolean; /** * Check if a 2D or 1D point is within a rectangle or range * @param point - The point defined as a tuple of [x, y] * coordinates. * @param rectangle - The rectangle defined * as a quadruple of [minX, maxX, minY, maxY] coordinates. * @return If `true` the [x,y] point is in the rectangle. */ export declare const isPointHalfwayInRect: ([x, y]: [number, number], [minX, maxX, minY, maxY]: [number, number, number, number]) => boolean; export {};