0.0.2 • Published 11 years ago

vectiny v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
11 years ago

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