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

/ray-vs-line-segment/

    Package Sidebar

    Install

    npm i ray-vs-line-segment

    Weekly Downloads

    2

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • psalaets