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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    11
  • 0.0.1
    3

Package Sidebar

Install

npm i vectiny

Weekly Downloads

10

Version

0.0.2

License

MIT

Last publish

Collaborators

  • tgvashworth