Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

ray-vs-line-segment

2.0.0 • Public • Published

ray-vs-line-segment

Ray-aware line segment intersection check.

Usage

var rayVsLineSegment = require('ray-vs-line-segment');

var ray = {
  start: {x: 2, y: 0},
  end: {x: 7, y: 0},
};

var segment = {
  start: {x: 5, y: 0},
  end: {x: 10, y: 0},
};

var point = rayVsLineSegment(ray, segment);

point // {x: 5, y: 0}

Install

npm install ray-vs-line-segment

License

MIT

install

npm i ray-vs-line-segment

Downloadsweekly downloads

21

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability