ray-vs-rect

    2.0.1 • Public • Published

    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

    Install

    npm i ray-vs-rect

    DownloadsWeekly Downloads

    5

    Version

    2.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar