src/Vec4.js
function Vec4() {
        switch ( arguments.length ) {
            case 1:
                // array or VecN argument
                var argument = arguments[0];
                this.x = argument.x || argument[0] || 0.0;
                this.y = argument.y || argument[1] || 0.0;
                this.z = argument.z || argument[2] || 0.0;
                this.w = argument.w || argument[3] || 0.0;
                break;
            case 4:
                // individual component arguments
                this.x = arguments[0];
                this.y = arguments[1];
                this.z = arguments[2];
                this.w = arguments[3] || 0.0;
                break;
            default:
                this.x = 0.0;
                this.y = 0.0;
                this.z = 0.0;
                this.w = 0.0;
                break;
        }
    }
function Vec4() {
        switch ( arguments.length ) {
            case 1:
                // array or VecN argument
                var argument = arguments[0];
                this.x = argument.x || argument[0] || 0.0;
                this.y = argument.y || argument[1] || 0.0;
                this.z = argument.z || argument[2] || 0.0;
                this.w = argument.w || argument[3] || 0.0;
                break;
            case 4:
                // individual component arguments
                this.x = arguments[0];
                this.y = arguments[1];
                this.z = arguments[2];
                this.w = arguments[3] || 0.0;
                break;
            default:
                this.x = 0.0;
                this.y = 0.0;
                this.z = 0.0;
                this.w = 0.0;
                break;
        }
    }
function Vec4 ( ) { switch ( arguments . length ) { case 1 : // array or VecN argument var argument = arguments [ 0 ] ; this . x = argument . x || argument [ 0 ] || 0.0 ; this . y = argument . y || argument [ 1 ] || 0.0 ; this . z = argument . z || argument [ 2 ] || 0.0 ; this . w = argument . w || argument [ 3 ] || 0.0 ; break ; case 4 : // individual component arguments this . x = arguments [ 0 ] ; this . y = arguments [ 1 ] ; this . z = arguments [ 2 ] ; this . w = arguments [ 3 ] || 0.0 ; break ; default : this . x = 0.0 ; this . y = 0.0 ; this . z = 0.0 ; this . w = 0.0 ; break ; } }
Instantiates a Vec4 object.
@class Vec4
@classdesc A four component vector.
Instantiates a Vec4 object .