npm.io
1.0.0 • Published 8 years ago

line-seg-intersect

Licence
MIT
Version
1.0.0
Deps
0
Size
6 kB
Vulns
0
Weekly
0
Stars
3

Line Segment Intersection

npm version build status code style prettier

Fast testing whether two line segments intersect

Install

npm i line-seg-intersect

API

const isIntersecting = lineSegIntersect(x1, x2, x3, x4, y1, y2, y3, y4)

Checks if two line segments (x1,y1)-(x2,y2) and (x3,y3)-(x4,y4) are intersecting.

Returns true if the two line segments intersect.

Keywords