Vec2
Information
This plugin for the Impact Game Engine adds, easy to use, class for two-dimensional vector and assorted functions to your project.
Usage
- 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);
Supported operations
Check the vec2.js ...
TODO
- Did you miss a vector operation? Contact me ...
Changelog
v1.1.0
- set(), setNull() and isNull() added
v1.0.0
- first commit
Credits
Based on Googles Closure Library math.Vec2