Simple mini library for finding line and line segment intersection

## How to use?

- With Node

`import * as $ from 'line-intersection'`

WithAnd use the functions:`es6`

you can import one or more of the functions directly -`import { fun, fun2 } from 'line-intersection'`

`$.function(params)`

`If you want you can replace ``$`

with any var name

- In normal project

## Functions:

*findIntersection*

*Input*: array with 4 objects inside with parametars "x" and "y"

`[{x: val, y: val}, {x: val, y: val}, {x: val, y: val}, {x: val, y: val}]`

The objects are points of the lines. There are 4 Objects for every point. In one line there are 2 points. We searching the intersection of two lines - `2 lines * 2 points = 4 objects`

*Output:*Object with "x" and "y" - the coords of the intersection point.

*findSegmentIntersection*

*Input*:

**Same as**- array with 4 objects inside with parametars "x" and "y"

*findIntersection*function*Output:*Object with "x" and "y"

**OR**"false" - The function returns false when the segments aren't crossed.

*isSegmentIntersected*

*Input*:

**Same as**- array with 4 objects inside with parametars "x" and "y"

*findSegmentIntersection*function*Output:*boolean - The function returns "true" when the line segments are crossed and "false" when they aren't.

*isPointBetween*

*Input:*three points (Objects with "x" and "y"). The point "p" must be first

`isPointBetween(p, a, b)`

*Output:*boolean