point-is-in-polygon
Version:
The `point-is-in-polygon` package is a lightweight package that was developed to check if the coordinates of a point are in the coordinates of a polygon.
13 lines (12 loc) • 386 B
TypeScript
import { PolygonData } from '../polygon/polygon-data';
import { PointData } from './point-data';
export declare class Point {
readonly x: number;
readonly y: number;
constructor({ x, y }: PointData);
private calc;
private haveIntersectionPoint;
private getIntersectionPoint;
private createIntersectionLines;
isInPolygon(polygon: PolygonData): boolean;
}