B2G/gecko/browser/devtools/tilt/TiltMath.jsm
/**
   * Multiplies the components of a vec3 by a scalar value.
   *
   * @param {Array} aVec
   *                vec3 to scale
   * @param {Number} aVal
   *                 numeric value to scale by
   * @param {Array} aDest
   *                optional, vec3 receiving operation result
   *                if not specified result is written to the first operand
   *
   * @return {Array} the destination vec3 if specified, first operand otherwise
   */
Multiplies the components of a vec3 by a scalar value.
@param {Array} aVec
vec3 to scale
@param {Number} aVal
numeric value to scale by
@param {Array} aDest
optional, vec3 receiving operation result
if not specified result is written to the first operand

@return {Array} the destination vec3 if specified, first operand otherwise
Multiplies the components of a vec3 by a scalar value . @param { Array } aVec vec3 to scale @param { Number } aVal numeric value to scale by @param { Array } aDest optional vec3 receiving operation result if not specified result is written to the first operand @return { Array } the destination vec3 if specified first operand otherwise
function V3_scale(aVec, aVal, aDest)
  {
    if (!aDest) {
      aDest = aVec;
    }
    aDest[0] = aVec[0] * aVal;
    aDest[1] = aVec[1] * aVal;
    aDest[2] = aVec[2] * aVal;
    return aDest;
  }
function V3_scale ( aVec , aVal , aDest ) { if ( ! aDest ) { aDest = aVec ; } aDest [ 0 ] = aVec [ 0 ] * aVal ; aDest [ 1 ] = aVec [ 1 ] * aVal ; aDest [ 2 ] = aVec [ 2 ] * aVal ; return aDest ; }
Multiplies the components of a vec3 by a scalar value.
Multiplies the components of a vec3 by a scalar value .