function vdp(v1, v2) {
  var n = 0, lim = Math.min(v1.length,v2.length);
  for (var i = 0; i < lim; i++) n += v1[i] * v2[i];
  return n;
}
/**
 ** Vector dot product (all dimensions)
 */
Vector dot product (all dimensions)
Vector dot product ( all dimensions )
function vdp(v1, v2) {
  var n = 0, lim = Math.min(v1.length,v2.length);
  for (var i = 0; i < lim; i++) n += v1[i] * v2[i];
  return n;
}
function vdp ( v1 , v2 ) { var n = 0 , lim = Math . min ( v1 . length , v2 . length ) ; for ( var i = 0 ; i < lim ; i ++ ) n += v1 [ i ] * v2 [ i ] ; return n ; }
Vector dot product (all dimensions)
Vector dot product ( all dimensions )