import { Corners, Point, Rect } from '../types'; /** * Gets the four extreme points of a rectangle, inclusive. */ export declare function rectCorners({ x, y, width, height }: Rect): Corners; /** * Gets the center point of a rectangle, optionally rounded. */ export declare function rectCenter({ x, y, width, height }: Rect, { round }?: { round?: boolean | undefined; }): Point; /** * Rounds a point to the nearest integer axis values. */ export declare function roundPoint({ x, y }: Point, { round }?: { round?: ((x: number) => number) | undefined; }): Point; /** * Flips a `Rect` vertically and horizontally within another `Rect`, equivalent * to a 180° rotation. * * @param outer bounding rectangle containing `inner` to flip within * @param inner rectangle to flip within `outer` */ export declare function flipRectVH(outer: Rect, inner: Rect): Rect; /** * Find how many pixel moves it takes to get from a to b. */ export declare function editDistance(a: Point, b: Point): number; export declare function euclideanDistance(a: Point, b: Point): number; /** * Find the median of a list of numbers. */ export declare function median(numbers: ArrayLike): number; /** * Compute the inner angle formed by vectors `ba` and `bc`. * * @see https://math.stackexchange.com/a/361419 */ export declare function angleBetweenPoints(a: Point, b: Point, c: Point): number; /** * Compute the area of a triangle. * * @see https://www.mathopenref.com/coordtrianglearea.html */ export declare function triangleArea(a: Point, b: Point, c: Point): number; /** * Compute the area of a 4-sided polygon. */ export declare function poly4Area([topLeft, topRight, bottomLeft, bottomRight,]: Corners): number;