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

rayish

1.2.0 • Public • Published

rayish

Line that goes for a while in one direction and then stops.

Usage

Create from start point and end point

var Rayish = require('rayish');

var start = {x: 0, y: 0};
var end = {x: 20, y: 15};

var r = new Rayish(start, end);

r.start // (0, 0)
r.end   // (20, 15)

Create from start point, some other point and length

var Rayish = require('rayish');

var start = {x: 0, y: 0};
var otherPointOnRay = {x: 20, y: 15};
var length = 5;

var r = new Rayish(start, otherPointOnRay, length);

r.start // (0, 0)
r.end   // (4, 3)

Install

npm install rayish

License

MIT

Keywords

install

npm i rayish

Downloadsweekly downloads

0

version

1.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability