UNPKG

poly-math-2d

Version:

2D Polygon math: boolean operations, triangulation, graphs, support for holes and non-convex shapes.

18 lines (17 loc) 553 B
export declare class Point { x: number; y: number; constructor(x: number, y: number); static getDistance(a: Point, b: Point): number; getDistance(to: Point): number; static getDistanceQuick(a: Point, b: Point): number; getDistanceQuick(to: Point): number; static getManhattanDistance(a: Point, b: Point): number; getManhattanDistance(to: Point): number; static getDistanceSquared(a: Point, b: Point): number; getDistanceSquared(to: Point): number; } export type PointType = { x: number; y: number; };