function vscale(v, factor) {
  var vs = [];
  for(var i=0; i<v.length; i++) vs.push(v[i] * factor);
  return vs;
}
/**
 ** Scales vectors in magnitude (all dimensions)
 */
Scales vectors in magnitude (all dimensions)
Scales vectors in magnitude ( all dimensions )
function vscale(v, factor) {
  var vs = [];
  for(var i=0; i<v.length; i++) vs.push(v[i] * factor);
  return vs;
}
function vscale ( v , factor ) { var vs = [ ] ; for ( var i = 0 ; i < v . length ; i ++ ) vs . push ( v [ i ] * factor ) ; return vs ; }
Scales vectors in magnitude (all dimensions)
Scales vectors in magnitude ( all dimensions )