Vec2 = function(x, y) {
    if (x instanceof Array || x instanceof Float32Array) {
        this.x = x[0] || 0;
        this.y = x[1] || 0;
    }
    else {
        this.x = x || 0;
        this.y = y || 0;
    }
}
A two-dimensional vector.

@class Vec2

@param {Number} x The x component.
@param {Number} y The y component.