# ray-vs-rect

> Ray-aware rectangle intersection check.

Latest version **2.0.1** (published 2014-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install ray-vs-rect
pnpm add ray-vs-rect
yarn add ray-vs-rect
bun add ray-vs-rect
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2014-11-09 |
| First published | 2014-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Paul Salaets |
| Maintainers | psalaets |
| Keywords | ray, rectangle, intersect, 2d |

## Links

- npm: https://www.npmjs.com/package/ray-vs-rect
- Repository: https://github.com/psalaets/ray-vs-rect
- Issues: https://github.com/psalaets/ray-vs-rect/issues
- npm.io page: https://npm.io/package/ray-vs-rect

## Dependencies (2)

- [vec2](https://npm.io/package/vec2.md) ^1.6.0
- [ray-vs-line-segment](https://npm.io/package/ray-vs-line-segment.md) ^2.0.0

## Recent versions

- 2.0.1 (latest) — 2014-11-09
- 2.0.0 — 2014-11-05
- 1.0.0 — 2014-11-03

## README

# ray-vs-rect

Ray-aware rectangle intersection check.

## Usage

    var rayVsRect = require('ray-vs-rect');
    
    var ray = {
      start: {x: 10, y: 50},
      end: {x: 70, y: 50}
    };

    var rect = {
      left: 45,
      top: 45,
      width: 10,
      height: 10
    };
    
    var point = rayVsRect(ray, rect);
    
    point // {x: 45, y: 50}

## Install

    npm install ray-vs-rect

## License

MIT

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