distance


          
  Boid.prototype.distance = function(boid) {
      var distX = this.x - boid.x;
          var distY = this.y - boid.y;
          return Math.sqrt(distX * distX + distY * distY);
  }