vec2 for the browser and node.js