https://github.com/dy/lines-intersection
Get intersection point of two lines, if any
https://github.com/dy/lines-intersection
Last synced: about 1 year ago
JSON representation
Get intersection point of two lines, if any
- Host: GitHub
- URL: https://github.com/dy/lines-intersection
- Owner: dy
- License: mit
- Created: 2018-04-24T00:01:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T00:01:52.000Z (about 8 years ago)
- Last Synced: 2025-03-16T04:34:38.265Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# lines-intersection [](http://github.com/badges/stability-badges) [](https://travis-ci.org/dy/lines-intersection)
Calculate intersection of two lines.
[](https://npmjs.org/package/lines-intersection/)
```js
const x = require('lines-intersection')
x(0,0, 1,1, 1,0, 0,1) // [.5, .5]
x([0,0, 1,1], [1,0, 0,1]) // [.5, .5]
x([0,0], [1,1], [1,0], [0,1]) // [.5, .5]
```
## Related
* [segseg](https://www.npmjs.com/package/segseg) − find intersection of two segments.
* [lines-intersect](https://www.npmjs.com/package/lines-intersect) − check if lines intersect.
* [simple-intersect](https://www.npmjs.com/package/simple-intersect) − collection of various intersection checkers.
## Analogs
* [linestring-intersect](https://www.npmjs.com/package/linestring-intersect)
* [line-intersect-2d](https://www.npmjs.com/package/line-intersect-2d)
* [line-segments-intersection](https://www.npmjs.com/package/line-segments-intersection)
* [line-segment-intersection](https://www.npmjs.com/package/line-segment-intersection)
* [@turf/line-intersect](https://www.npmjs.com/package/@turf/line-intersect)
* [line-intersection](https://www.npmjs.com/package/line-intersection)
* [line-intersect](https://www.npmjs.com/package/line-intersect)
* [intersection](https://www.npmjs.com/package/intersection)
## License
(c) 2018 Dmitry Yv. MIT License