Applies function to all pairs in Float64Array - Node.js Data Type

Node.js examples for Data Type:Float64Array

Description

Applies function to all pairs in Float64Array

Demo Code

/* Applies function to all pairs */
Float64Array.prototype.eachPair = function(func){
  for(var i=0; i < this.length; i++){
    for(var j=i+1; j < this.length; j++){
      func.call(this, i, j);//from   w ww  . j  a  v a  2  s  .c om
    }
  }
}

Related Tutorials