function vDivideScalar(scalar, v) {

            var vOut = new Array(3);

            if (scalar !== 0) {

                var invScalar = 1 / scalar;
                vOut[0] = v[0] * invScalar;
                vOut[1] = v[1] * invScalar;
                vOut[2] = v[2] * invScalar;

            }

            return vOut;

        }
/**
         * Divides this vector by scalar s.
         * Set vector to ( 0, 0, 0 ) if s == 0.
         * @param scalar - Numerical
         * @param v - Numerical array
         * @returns {Array}
         */
Divides this vector by scalar s.
Divides this vector by scalar s .
function vDivideScalar(scalar, v) {
            var vOut = new Array(3);
            if (scalar !== 0) {
                var invScalar = 1 / scalar;
                vOut[0] = v[0] * invScalar;
                vOut[1] = v[1] * invScalar;
                vOut[2] = v[2] * invScalar;
            }
            return vOut;
        }
function vDivideScalar ( scalar , v ) { var vOut = new Array ( 3 ) ; if ( scalar !== 0 ) { var invScalar = 1 / scalar ; vOut [ 0 ] = v [ 0 ] * invScalar ; vOut [ 1 ] = v [ 1 ] * invScalar ; vOut [ 2 ] = v [ 2 ] * invScalar ; } return vOut ; }
Divides this vector by scalar s.
 Set vector to ( 0, 0, 0 ) if s == 0.
Divides this vector by scalar s . Set vector to ( 0 0 0 ) if s == 0 .