Skip to content

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

License

Notifications You must be signed in to change notification settings

psalaets/rayish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published