ES6 2D Vector Class
npm install wtc-vector
let vPosition = new Vector(10, 10);
let vForce = new Vector(0, 1);
vPosition.add(vForce); // [0, 11];
`Using the es5 bundle in browser
`
npm install --save wtc-vector
`
$3
Add the final module to your JS bundle.
`
...JS bundle logic
node_modules/wtc-vector/dist/es5-bundle.js
`
The module will then be exposed inside `window` as `window.WTCVector.default`
#### Example
`
`` A basic Vector demonstration.
- Addition proof
A basic proof of addition with vectors, with associated display.
- Unit vectors
Shows the use of unit vectors and the reasoning behind their use in a vector's redering.
- Linear transformations
This demo shows how to calculate linear transformations (specifically in the vector space's unit vectors).
- Snowflake
This demonstrates the use of a rotating vector as a a method of calculating a sinewave and it's applicable use in the animation of a falling snowflake.