vectiny

0.0.2 • Public • Published

vectiny

very tiny 2D vectors.

var loc = V(100,100);
var vel = V(15,12);
var grav = V(0,-9.2);
 
// Add them
vel = vel.add(grav);
loc = loc.add(vel);
 
// Find the magnitude
var speed = vel.magnitude();

Methods include: add, sub, mult, unit, limit, mag, to and from.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i vectiny

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • tgvashworth