# line-seg-intersect

> Fast testing whether two line segments intersect

Latest version **1.0.0** (published 2018-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install line-seg-intersect
pnpm add line-seg-intersect
yarn add line-seg-intersect
bun add line-seg-intersect
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-09-26 |
| First published | 2018-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Fritz Lekschas |
| Maintainers | flekschas |
| Keywords | 2d, line segments, intersection, fast, spatial |

## Links

- npm: https://www.npmjs.com/package/line-seg-intersect
- Repository: https://github.com/flekschas/line-seg-intersect
- Issues: https://github.com/flekschas/line-seg-intersect/issues
- npm.io page: https://npm.io/package/line-seg-intersect

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-09-26

## README

# Line Segment Intersection

[![npm version](https://img.shields.io/npm/v/line-seg-intersect.svg)](https://www.npmjs.com/package/line-seg-intersect)
[![build status](https://travis-ci.org/flekschas/line-seg-intersect.svg?branch=master)](https://travis-ci.org/flekschas/line-seg-intersect)
[![code style prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/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.

---
_Source: https://npm.io/package/line-seg-intersect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
