|
573 | 573 |
|
574 | 574 | JSROOT.Math.gaus = function(f, x, i) { |
575 | 575 | // function used when gaus(0) used in the TFormula |
576 | | - return f.fParams[i+0] * Math.exp(-0.5 * Math.pow((x-f.fParams[i+1]) / f.fParams[i+2], 2)); |
| 576 | + return f.GetParValue(i+0) * Math.exp(-0.5 * Math.pow((x-f.GetParValue(i+1)) / f.GetParValue(i+2), 2)); |
577 | 577 | }; |
578 | 578 |
|
579 | 579 | JSROOT.Math.gausn = function(f, x, i) { |
580 | | - return JSROOT.Math.gaus(f, x, i)/(Math.sqrt(2 * Math.PI) * f.fParams[i+2]); |
| 580 | + return JSROOT.Math.gaus(f, x, i)/(Math.sqrt(2 * Math.PI) * f.GetParValue(i+2)); |
581 | 581 | }; |
582 | 582 |
|
583 | 583 | JSROOT.Math.expo = function(f, x, i) { |
584 | | - return Math.exp(f.fParams[i+0] + f.fParams[i+1] * x); |
| 584 | + return Math.exp(f.GetParValue(i+0) + f.GetParValue(i+1) * x); |
585 | 585 | }; |
586 | 586 |
|
587 | 587 | JSROOT.Math.landau = function(f, x, i) { |
588 | | - return JSROOT.Math.Landau(x, f.fParams[i+1],f.fParams[i+2], false); |
| 588 | + return JSROOT.Math.Landau(x, f.GetParValue(i+1),f.GetParValue(i+2), false); |
589 | 589 | } |
590 | 590 |
|
591 | 591 | JSROOT.Math.landaun = function(f, x, i) { |
592 | | - return JSROOT.Math.Landau(x, f['fParams'][i+1],f['fParams'][i+2], true); |
| 592 | + return JSROOT.Math.Landau(x, f.GetParValue(i+1),f.GetParValue(i+2), true); |
593 | 593 | } |
594 | 594 |
|
595 | 595 | return JSROOT; |
|
0 commit comments