SMathUtil.d.ts 923 B

1234567891011121314151617
  1. import { SLine, SPoint, SRect } from "@persagy-web/draw/lib";
  2. import { MinDis } from "../types/MinDis";
  3. import { Point } from "../types/Point";
  4. import { PointToLine } from "../types/PointToLine";
  5. import { Outline } from "../types/Outline";
  6. export declare class SMathUtil {
  7. static pointDistance(x1: number, y1: number, x2: number, y2: number): number;
  8. static getMinDisPoint(p: SPoint, arr: Point[]): MinDis | null;
  9. static pointToLine(p: SPoint, l: SLine): PointToLine;
  10. static getMinDisLine(p: SPoint, arr: Point[]): PointToLine | null;
  11. static rectIntersection(rect1: SRect, rect2: SRect): boolean;
  12. static lineIntersection(line1: SLine, line2: SLine): SPoint | null | string;
  13. static transferToArray(SP: SPoint[]): number[][];
  14. static transferToSPoint(arr: number[][]): SPoint[];
  15. static getIntersectInArray(array: number[][][]): Outline[];
  16. static calculateArea(arr: SPoint[]): number;
  17. }