Path : function() {   var curves = []; var weights = []; var ranges = []; var totalWeight = 0;  this.add = function(/* dojo.math.curves.* */curve, /* float */weight) {   if( weight < 0 ) { dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0"); } curves.push(curve); weights.push(weight); totalWeight += weight; computeRanges(); }  this.remove = function(/* dojo.math.curves.* */curve) {   for(var i = 0; i < curves.length; i++) { if( curves[i] == curve ) { curves.splice(i, 1); totalWeight -= weights.splice(i, 1)[0]; break; } } computeRanges(); }  this.removeAll = function() {   curves = []; weights = []; totalWeight = 0; }  this.getValue = function(/* float */n) {   var found = false, value = 0; for(var i = 0; i < ranges.length; i++) { var r = ranges[i];  if( n >= r[0] && n < r[1] ) { var subN = (n - r[0]) / r[2]; value = curves[i].getValue(subN); found = true; break; } }   if( !found ) { value = curves[curves.length-1].getValue(1); }  for(var j = 0; j < i; j++) { value = dojo.math.points.translate(value, curves[j].getValue(1)); } return value; }  function computeRanges() { var start = 0; for(var i = 0; i < weights.length; i++) { var end = start + weights[i] / totalWeight; var len = end - start; ranges[i] = [start, end, len]; start = end; } }  return this; } 
},Path:function(){ var _a99=[]; var _a9a=[]; var _a9b=[]; var _a9c=0; this.add=function(_a9d,_a9e){ if(_a9e<0){ dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0"); } _a99.push(_a9d); _a9a.push(_a9e); _a9c+=_a9e; computeRanges(); }; this.remove=function(_a9f){ for(var i=0;i<_a99.length;i++){ if(_a99[i]==_a9f){ _a99.splice(i,1); _a9c-=_a9a.splice(i,1)[0]; break; } } computeRanges(); }; this.removeAll=function(){ _a99=[]; _a9a=[]; _a9c=0; }; this.getValue=function(n){ var _aa2=false,_aa3=0; for(var i=0;i<_a9b.length;i++){ var r=_a9b[i]; if(n>=r[0]&&n<r[1]){ var subN=(n-r[0])/r[2]; _aa3=_a99[i].getValue(subN); _aa2=true; break; } } if(!_aa2){ _aa3=_a99[_a99.length-1].getValue(1); } for(var j=0;j<i;j++){ _aa3=dojo.math.points.translate(_aa3,_a99[j].getValue(1)); } return _aa3; }; function computeRanges(){ var _aa8=0; for(var i=0;i<_a9a.length;i++){ var end=_aa8+_a9a[i]/_a9c; var len=end-_aa8; _a9b[i]=[_aa8,end,len]; _aa8=end; } } return this; }}; 
  Path : function() {    //  summary    //  Generic path shape, created from curve segments    var curves = [];    var weights = [];    var ranges = [];    var totalWeight = 0;    this.add = function(/* dojo.math.curves.* */curve, /* float */weight) {      //  summary      //  Add a curve segment to this path      if( weight < 0 ) { dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0"); }      curves.push(curve);      weights.push(weight);      totalWeight += weight;      computeRanges();    }    this.remove = function(/* dojo.math.curves.* */curve) {      //  summary      //  Remove a curve segment from this path      for(var i = 0; i < curves.length; i++) {        if( curves[i] == curve ) {          curves.splice(i, 1);          totalWeight -= weights.splice(i, 1)[0];          break;        }      }      computeRanges();    }    this.removeAll = function() {      //  summary      //  Remove all curve segments      curves = [];      weights = [];      totalWeight = 0;    }    this.getValue = function(/* float */n) {      //  summary      //  Returns the point at point N (in terms of percentage) on this curve.      var found = false, value = 0;      for(var i = 0; i < ranges.length; i++) {        var r = ranges[i];        //w(r.join(" ... "));        if( n >= r[0] && n < r[1] ) {          var subN = (n - r[0]) / r[2];          value = curves[i].getValue(subN);          found = true;          break;        }      }      // FIXME: Do we want to assume we're at the end?      if( !found ) {        value = curves[curves.length-1].getValue(1);      }      for(var j = 0; j < i; j++) {        value = dojo.math.points.translate(value, curves[j].getValue(1));      }      return value; //  array    }    function computeRanges() {      var start = 0;      for(var i = 0; i < weights.length; i++) {        var end = start + weights[i] / totalWeight;        var len = end - start;        ranges[i] = [start, end, len];        start = end;      }    }    return this;  //  dojo.math.curves.Path  }
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/90939f35f46f873d9b1f5c5f818ecf012711dc71/dojo.js/buggy/src/main/resources/org/apache/struts2/static/dojo/dojo.js