getComponent( index ) {

		switch ( index ) {

			case 0: return this.x;
			case 1: return this.y;
			case 2: return this.z;
			case 3: return this.w;
			default: throw new Error( 'index is out of range: ' + index );

		}

	}
Returns the value of the vector component which matches the given index.

@param {number} index - The component index. `0` equals to x, `1` equals to y,
`2` equals to z, `3` equals to w.
@return {number} A vector component value.