export declare type Point = [number, number]; export declare type Vector = Point; export declare class Line { p: Point; v: Vector; l: number; constructor(p0: Point, p1: Point); set(p0: Point, p1: Point): void; toString(): string; } export declare class Ray extends Line { toString(): string; } export declare function create(x?: number, y?: number): Point; export declare function clone(p: Point): Point; export declare function copy(out: Point, a: Point): Point; export declare function set(out: Point, x: number, y: number): Point; export declare function min(out: Point, a: Point, b: Point): Point; export declare function max(out: Point, a: Point, b: Point): Point; export declare function negate(out: Point, p: Point): Point; export declare function dot(v1: Point, v2: Point): number; export declare function len(v: Point): number; export declare function lenSquare(v: Point): number; export declare function normalize(out: Point, v: Point): Point; export declare function dist(p0: Point, p1: Point): number; export declare function distSquare(p0: Point, p1: Point): number; export declare function numberApproxEqual(a: number, b: number): boolean; export declare function approxEqual(p0: Point, p1: Point): boolean; export declare function equal(p0: Point, p1: Point): boolean; export declare function scale(out: Point, v: Point, s: number): Point; export declare function mul(out: Point, v1: Point, v2: Point): Point; export declare function scaleAndAdd(out: Point, v1: Point, v2: Point, s: number): Point; export declare function add(out: Point, v1: Point, v2: Point): Point; export declare function sub(out: Point, v1: Point, v2: Point): Point; export declare function cross(a: Point, b: Point): number; export declare const LINE_TYPE_SEG: 0; export declare const LINE_TYPE_RAY: 1; export declare const LINE_TYPE_LINE: 2; export declare type LINE_TYPES = typeof LINE_TYPE_RAY | typeof LINE_TYPE_SEG | typeof LINE_TYPE_LINE; export declare function lineIntersection(out: Point, line1: Line, line2: Line, line1Type: LINE_TYPES, line2Type: LINE_TYPES): boolean; export declare function pointToLineDistance(pt: Point, line: Line, lineType: LINE_TYPES): number; export declare function area(points: Point[]): number; export declare function triangleArea(p0: Point, p1: Point, p2: Point): number;