This plugin for the Impact Game Engine adds, easy to use, class for two-dimensional vector and assorted functions to your project.
- Put it in your plugins directory.
- Add it in the requires of your main.js.
- Use it like this:
var vec1 = ig.Vec2(1, 2);
var vec2 = ig.Vec2(3, 4);
vec1.add(vec2);
vec2.norm();
var vec3 = ig.Vec2.sum(vec1, vec2);
Check the vec2.js ...
- Did you miss a vector operation? Contact me ...
- set(), setNull() and isNull() added
- first commit
Based on Googles Closure Library math.Vec2