import type { MValue, Properties, VectorPoint } from '../../../index.js'; /** * An intersection of two segments * u and t are where the intersection occurs */ export interface IntersectionOfSegments { /** the intersection point */ point: VectorPoint; /** where along the first segment the intersection occurs */ u: number; /** where along the second segment the intersection occurs */ t: number; } /** * An intersection of two segments including displacement vectors * u and t are where the intersection occurs */ export interface IntersectionOfSegmentsRobust { /** the intersection point */ point: VectorPoint; /** where along the first segment the intersection occurs */ u: number; /** where along the second segment the intersection occurs */ t: number; /** displacement vector from the first segment */ uVec: VectorPoint; /** displacement vector from the second segment */ tVec: VectorPoint; /** Absolute angle of segment 'a' in radians [-PI, PI] */ uAngle: number; /** Absolute angle of segment 'b' in radians [-PI, PI] */ tAngle: number; } /** * Find the intersection of two segments * * NOTE: Segments that are only touching eachothers endpoints are considered intersections * @param a - the first segment * @param b - the second segment * @returns A point if the segments intersect where the intersection occurs, otherwise undefined */ export declare function intersectionOfSegments(a: [VectorPoint, VectorPoint], b: [VectorPoint, VectorPoint]): IntersectionOfSegments | undefined; /** * Find the intersection of two segments. A more robust approach that uses predicates to ensure no * false positives/negatives * * NOTE: * If the segments are touching at end points, they PASS in this function. However, the caviat is * that if the segments are coming from the same ring, then the result will be undefined (not * considered an intersection). * * NOTE: The resultant vectors are displacement vectors not normalized. * @param a - the first segment * @param b - the second segment * @param sameRing - if both segments are from the same ring. By default it assumes they are * @returns a point if the segments intersect where the intersection occurs, otherwise undefined */ export declare function intersectionOfSegmentsRobust(a: [VectorPoint, VectorPoint], b: [VectorPoint, VectorPoint], sameRing?: boolean): IntersectionOfSegmentsRobust | undefined; //# sourceMappingURL=intersection.d.ts.map